I’m having trouble using the umbraco default datatype “related links”. My problem is that I want to iterate the property’s children/options. I’ve seen examples using xml and xslt but I’m wondering if there’s any possibilty to use pure c# inside a User Control.
Something like this (But a working variant)
Node node = new Node(Node.getCurrentNodeId());
var linklist = node.GetProperty("link");
if (node.GetProperty("link") != null)
{
foreach (var item in linklist)
{
//get each item here
}
}
Thanks!
(I’ve also posted the question here)
Ok, so here’s what i did to make it work. I used Jorge’s answer but changed it a little, very little. By the help of looking in the umbraco.config this is how i did
I think I could have used a little of Derek’s asnwer in a usercontrol. By that i mean i could have selected the property as usual and the used XmlTextReader to read the xml-part of the selected property. Thanks for your halp!