Im getting some ID's from a multinode tree picker, and i want to loop each "selection" i made with the picker.
Lets say i've chosen 2 pages from a multinode tree picker, then I want to loop these, and get the pageName of these... Right now im only getting the ID's of the selections, but I want to loop each, and then get the name, hope it makes sense
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
var getCategories = CurrentPage.category;
}
//Here I want to loop the categories, and display the pagename for the categories chosen
get values from Multinode Tree Picker
Hey guys...
Im getting some ID's from a multinode tree picker, and i want to loop each "selection" i made with the picker.
Lets say i've chosen 2 pages from a multinode tree picker, then I want to loop these, and get the pageName of these...
Right now im only getting the ID's of the selections, but I want to loop each, and then get the name, hope it makes sense
Hi i had the same problem. What is being returned is XML
So what you can do is get your property as string which will return something like <multinodetreepicker><nodeid>1001</nodeid>
What you need to do is create a new XMLDocument
XmlDocument mntpDocument = new XmlDocument(pass in your multi node picker property value);
XmlNode node = mntpDocument.Child();
foreach(XmlNode nodeIdNode in node.Child().InnerText())
{
nodeIdNode will now be the id with out the XML
}
You will need to do some work but this is the idea :).
Hope this helps.
Charlie
is working on a reply...