Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Martijn van der Put 44 posts 65 karma points
    Sep 09, 2010 @ 18:28
    Martijn van der Put
    0

    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

     

  • Sascha Wolter 615 posts 1101 karma points
    Sep 09, 2010 @ 20:53
    Sascha Wolter
    0

    Hi Martijn,

    give this a try:

    <xsl:value-of select="$currentPage/ancestor-or-self::* [@isDoc and @nodeName = 'Parcae']/@id" />

    Hope that helps,

    Sascha


Please Sign in or register to post replies

Write your reply to:

Draft