Hi, I've found this which seems to be checking if the current node is the ancestor or self, but it always returns false...I'm basically looking for the equivalent of "$currentPage/ancestor-or-self::node/@id = 2880" XSLT.
Would it not just be easier just todo Umbraco.Content(2880).Path.Contains(CurrentPage.Id) ?? Btw Amir loved your last fight ;-} Sorry could not help myself there!
Is anyone of those more efficient than the other? I'm just trying to switch things around based on the parent page for a 2 site installation, here's what actually ended up working for me, Ancestor only worked on the homapge, but no subpages. I'm not sure why that behavior is different than it was in the past.
Check if ancestor of node by id
Hi, I've found this which seems to be checking if the current node is the ancestor or self, but it always returns false...I'm basically looking for the equivalent of "$currentPage/ancestor-or-self::node/@id = 2880" XSLT.
Any ideas?
Amir
Try this:
Perfect, thanks Jeavon!
Actually, it looks like this returns false on any subpages?
Amir, Jeavon,
Would it not just be easier just todo Umbraco.Content(2880).Path.Contains(CurrentPage.Id) ?? Btw Amir loved your last fight ;-} Sorry could not help myself there!
Regards
Ismail
Hi Ismail!
Is anyone of those more efficient than the other? I'm just trying to switch things around based on the parent page for a 2 site installation, here's what actually ended up working for me, Ancestor only worked on the homapge, but no subpages. I'm not sure why that behavior is different than it was in the past.
@Amir that is correct, if you think about it.
@Ismail That's pretty much what it's doing but remember "1023" is contained in "11023" :)
is working on a reply...