Copied to clipboard

Flag this post as spam?

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


  • sravani 50 posts 70 karma points
    May 24, 2011 @ 13:22
    sravani
    0

    Second level navigation menu!!

    Hi All,

    my code is...

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library"
      exclude-result-prefixes="msxml umbraco.library">
       
    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>
    <xsl:template match="/">

      <xsl:variable name="items" select="$currentPage/ancestor-or-self::* [@isDoc and @level = 2]/* [@isDoc and string(umbracoNaviHide) != '1']"/>
     
    <!-- The fun starts here -->
       
    <xsl:if test="count($items) &gt; 0">
    <ul>

    <xsl:for-each select="$items">
      <li>
        <a href="{umbraco.library:NiceUrl(@id)}">
          <xsl:value-of select="@nodeName"/>
        </a>
      </li>
    </xsl:for-each>
    </ul>
        </xsl:if>

    </xsl:template>

    </xsl:stylesheet>

    It working perfect to me but I need every time I have to select the firstchild node How can I achive that??

    Pls any ideas share with me......

    Thanks in adavance...

Please Sign in or register to post replies

Write your reply to:

Draft