Copied to clipboard

Flag this post as spam?

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


  • Fuji Kusaka 2203 posts 4220 karma points
    May 25, 2011 @ 12:30
    Fuji Kusaka
    0

    Displaying a Nodes in SiteMap with by using template

    Hi Guys,

    I have multiple folders under my Content Node and am trying to get my XSLT Site map to display the nodes which are under a folder and using this piece of code but am not getting the node displayed.

    Any Suggestions?

     

    <xsl:variable name="maxLevelForSitemap" select="4"/>

    <xsl:template match="/">
    <div id="sitemap"> 
      <xsl:call-template name="drawNodes">  
          <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::* [@isDoc and @level=1]"/>  
      </xsl:call-template>
    </div>
    </xsl:template>

    <xsl:template name="drawNodes">
    <xsl:param name="parent"/> 
    <xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0 or (umbraco.library:IsProtected($parent/@id, $parent/@path) = 2 and umbraco.library:IsLoggedOn() = 1)">
    <ul>

      <xsl:for-each select="$parent/* [@isDoc and @level &lt;= $maxLevelForSitemap and string (@template) !='0' and name()  !='folder1
    ']"> 
      <li>  
        <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a>  
      
      <xsl:if test="count(./* [@isDoc and  @level &lt;= $maxLevelForSitemap and string (@
    template)  !='0' and name ()  != 'folder1']) &gt; 0">   
        <xsl:call-template name="drawNodes">    
            <xsl:with-param name="parent" select=""/>    
        </xsl:call-template>  
      </xsl:if> 
    </li>
        
        
    </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