I'm trying to get a parent-item in one of my Macros but I'm not getting any results.
I tried the code below to get the id of the item but it doesn't result anything <xsl:value-of select="$currentPage/ancestor-or-self::node [@nodeTypeAlias = 'ParcaeTextpage1column']/@id" />
I also tried another variant like <xsl:value-of select="$currentPage/ancestor-or-self::node [@nodeName = 'Parcae']/@id" /> but that also doesn't return anything.
The $currentPage returns the id that I expect, but that is all that I can get to work.
Issue with ancestor-or-self in 4.5.1
I'm trying to get a parent-item in one of my Macros but I'm not getting any results.
I tried the code below to get the id of the item but it doesn't result anything
<xsl:value-of select="$currentPage/ancestor-or-self::node [@nodeTypeAlias = 'ParcaeTextpage1column']/@id" />
I also tried another variant like
<xsl:value-of select="$currentPage/ancestor-or-self::node [@nodeName = 'Parcae']/@id" />
but that also doesn't return anything.
The $currentPage returns the id that I expect, but that is all that I can get to work.
hope that someone can help me with that
Hi Martijn,
give this a try:
<xsl:value-of select="$currentPage/ancestor-or-self::* [@isDoc and @nodeName = 'Parcae']/@id" />
Hope that helps,
Sascha
is working on a reply...