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
Hi
I have a site with pages at multiple levels, I think it goes 5 deep at one point.
I want to write some xslt that will tell me on each page what that pages level2 ancestor is.
I've messed around with
<xsl:for-each select="$currentPage/ancestor-or-self::node [@level=2]/node [string(data [@alias='umbracoNaviHide']) != '1']"><xsl:value-of select="@id"/></xsl:for-each>
but it just seems to give me unrelated nodes. I only want to know the name of the ancestor node at level 2. Can anyone help?
Thanks
Shaun
Hi Shaun,
<xsl:value-of select="$currentPage/ancestor-or-self::node[@level = 2]/@nodeName" />
It's that easy :-)
/Chriztian
Aha!
Boy do I feel dumb now.
Thanks Chriztian!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Finding out who my ancestors are
Hi
I have a site with pages at multiple levels, I think it goes 5 deep at one point.
I want to write some xslt that will tell me on each page what that pages level2 ancestor is.
I've messed around with
but it just seems to give me unrelated nodes. I only want to know the name of the ancestor node at level 2. Can anyone help?
Thanks
Shaun
Hi Shaun,
It's that easy :-)
/Chriztian
Aha!
Boy do I feel dumb now.
Thanks Chriztian!
is working on a reply...