Copied to clipboard

Flag this post as spam?

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


  • Muhammad Anees 8 posts 28 karma points
    Jan 22, 2011 @ 10:28
    Muhammad Anees
    0

    How to display 0 Level nodes in Xslt

    Hii every body,

    I want to display 0 level nodes in my Navigatin Menu like Home, Products, Contact Us etc. in Xslt.

    I specity <xsl:variable name="level" select="0"/> but it does not show, I have no child level Document Type.

    Thanks....

    Regards,
    Anees

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jan 22, 2011 @ 11:28
    Kim Andersen
    0

    Hi Muhammad.

    I think this will work for you:

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

    The top most nodes are actually level 1, but anyway.

    /Kim A

Please Sign in or register to post replies

Write your reply to:

Draft