Copied to clipboard

Flag this post as spam?

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


  • Fredrik 89 posts 108 karma points
    Oct 26, 2010 @ 14:39
    Fredrik
    0

    For-each through parent childs

    I have a structure like following:

    Content

         ContentLevel2

     

    From ContentLevel2 I need to step back and iterate through the childs of Content. I've tried following without any success:

    <xsl:for-each select="umbraco.library:GetXmlNodeById(./@parentID)/descendant [@isDoc and string(umbracoNaviHide) != '1']">
      
      <a href="{umbraco.library:NiceUrl(@id)}">
       <xsl:value-of select="@nodeName"/>
      </a>

    </xsl:for-each>

     

  • Sean Mooney 131 posts 158 karma points c-trib
    Oct 26, 2010 @ 14:59
    Sean Mooney
    0

    If Content is a different document type you could try somthing like this:

    <xsl:for-each select="$currentPage/ancestor-or-self::Content//* [@isDoc and string(umbracoNaviHide) != '1']">
    
      <a href="{umbraco.library:NiceUrl(@id)}">
       <xsl:value-of select="@nodeName"/>
      </a>
    
    </xsl:for-each>
    
    
    

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies