Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
It's obviously been too long since I queried with XPATH as I'm struggling with this.
I've got a node, I know its ID and I know that one of its ancestors further up the tree is of document type 'en'.
How do I find that that 'en' node?
Thanks in advance.
Matt
Easier after a night's sleep. :-)
//*[@id=" + node.Id + "]/ancestor::Lang [@isDoc]
'Lang' = doc type alias you're looking for.
Hi Matt,
If you have IPublishedContent node then you can get ancestors using below.
node.Ancestor("en")
Hope it will help.
Regards,
Urvish Mandaliya
Thanks Urvish,
I don't because it's Umbraco 4.7.
Regards, Matt
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
XPATH : find ancestor of doctype x for given node?
It's obviously been too long since I queried with XPATH as I'm struggling with this.
I've got a node, I know its ID and I know that one of its ancestors further up the tree is of document type 'en'.
How do I find that that 'en' node?
Thanks in advance.
Matt
Easier after a night's sleep. :-)
//*[@id=" + node.Id + "]/ancestor::Lang [@isDoc]
'Lang' = doc type alias you're looking for.
Hi Matt,
If you have IPublishedContent node then you can get ancestors using below.
Hope it will help.
Regards,
Urvish Mandaliya
Thanks Urvish,
I don't because it's Umbraco 4.7.
Regards, Matt
is working on a reply...