I am trying to do a breadcrumb, but due to the implementation in need to do this in a usercontrol. I need a list of parents nodes from my current node.
I know I can do the breadcrumb in RAZOR or XSLT.
I need a GetAncestorOrSelfNodes property to bring back a list.
Thanks for the reply. I have seen some examples of the uComponents but didnt want to resort to this if there was a standard API way of doing things. I'd seen this bit of code.
And it looked like there was a GetAncestorOrSelfNodes on the Umbraco Node which seems to have disappeared?. Normally I would just do this using Razor, but I'm building a bilingual website that has two sets of placeholders on every document, so I need it a little more dynamic.
List of Parents (HELP)
I am trying to do a breadcrumb, but due to the implementation in need to do this in a usercontrol. I need a list of parents nodes from my current node.
I know I can do the breadcrumb in RAZOR or XSLT.
I need a GetAncestorOrSelfNodes property to bring back a list.
Hi Craig,
If you have uComponents installed, how about a uQuery call like:
HTH,
Hendy
Hi Hendy,
Thanks for the reply. I have seen some examples of the uComponents but didnt want to resort to this if there was a standard API way of doing things. I'd seen this bit of code.
umbraco.presentation.nodeFactory.Node curNode = umbraco.presentation.nodeFactory.Node.GetCurrent();
umbraco.presentation.nodeFactory.Node target = curNode.GetAncestorOrSelfNodes().Where(n => n.GetProperty<string>("activeMenu") == "Main" || n.Id == 1672).FirstOrDefault();
And it looked like there was a GetAncestorOrSelfNodes on the Umbraco Node which seems to have disappeared?. Normally I would just do this using Razor, but I'm building a bilingual website that has two sets of placeholders on every document, so I need it a little more dynamic.
Hi Hendy,
I've just tried your suggestion but I don't get the method
Just fixed it, i need a reference to
using uComponents.Core.uQueryExtensions;
Thanks Hendy.
is working on a reply...