contentpicker in content section to pick from custom section
Ive build a custom section where I have my products. My goal is I want to reach these product from my content pages. Therefore I created a custom datatype with a contentpicker. The contentpicker should be able to pick a product from my custom section. Here's my code from my customdatatype:
public partial class ShopContentPicker : System.Web.UI.UserControl, umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor { protected ContentPicker _nodePicker = new ContentPicker(); protected void Page_Load(object sender, EventArgs e) { _nodePicker.AppAlias = "shop"; _nodePicker.TreeAlias = "Products"; plhControls.Controls.Add(_nodePicker);
}
#region IUsercontrolDataEditor Members
public object value { get { return _nodePicker.Value; } set { if (value != null) { _nodePicker.Value = value.ToString(); } } }
#endregion }
Ive added my custom datatype to my documenttype. After that its visible on my contentpage (products). It launhces fine and the productstree is visible, but when I pick a node, its looking for corresponding edit page which it shows in the custom section. And off cource this results in an error. So in a way the tree is doing what ive coded earlier, but in this new situation I want to pick the nodeid (product). So how can I achieve this, Im looking for same functionality which the mediapicker offers, just on my custom section with the contentpicker.
contentpicker in content section to pick from custom section
Ive build a custom section where I have my products. My goal is I want to reach these product from my content pages. Therefore I created a custom datatype with a contentpicker. The contentpicker should be able to pick a product from my custom section. Here's my code from my customdatatype:
public partial class ShopContentPicker : System.Web.UI.UserControl,
umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor
{
protected ContentPicker _nodePicker = new ContentPicker();
protected void Page_Load(object sender, EventArgs e)
{
_nodePicker.AppAlias = "shop";
_nodePicker.TreeAlias = "Products";
plhControls.Controls.Add(_nodePicker);
}
#region IUsercontrolDataEditor Members
public object value
{
get
{
return _nodePicker.Value;
}
set
{
if (value != null)
{
_nodePicker.Value = value.ToString();
}
}
}
#endregion
}
Ive added my custom datatype to my documenttype. After that its visible on my contentpage (products). It launhces fine and the productstree is visible, but when I pick a node, its looking for corresponding edit page which it shows in the custom section. And off cource this results in an error. So in a way the tree is doing what ive coded earlier, but in this new situation I want to pick the nodeid (product). So how can I achieve this, Im looking for same functionality which the mediapicker offers, just on my custom section with the contentpicker.
is working on a reply...