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
    Jul 13, 2011 @ 21:36
    Fuji Kusaka
    0

    XSLT Error when parsing Breadcrumb

    I have the following structure in my content

    - Default
    -- Page 1
    -- Page 2
    - Structure (same level as default)
    -- Structurial Level 1
    --- Sub Level 1
    --- Sub Level 2
    -- Structurial Level 2(same level as default)

    When accessing the Sub Level 1 or Sub Level 2 which are normally on @level = 3 my, I get an error with my breadcrumb.Even after defining the max level am having the same issue.

    <xsl:variable name="minLevel" select="1"/>
      <xsl:variable name="maxLevel" select="4"/>

      <xsl:template match="/">
        
        <xsl:if test="$currentPage/@level &gt; $minLevel">
          <ul>
            <li>
              <a href="/">Home</a>
           </li>        
            <xsl:for-each select="$currentPage/ancestor::* [@level &gt; $minLevel and @level &lt;= $maxLevel and string(umbracoNaviHide) != '1']">
              <li>
               > <a href="{umbraco.library:NiceUrl(linkToSubpage)}">
                  <xsl:value-of select="@nodeName"/></a>
              </li>
            </xsl:for-each>
            
          
            <!-- print currentpage -->
            <li>
             > <xsl:value-of select="$currentPage/@nodeName"/>
            </li>
          </ul>
        </xsl:if>

     

     

    //fuji

     

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jul 15, 2011 @ 08:01
    Kim Andersen
    0

    I've posted an answer to this question in the other post her: http://our.umbraco.org/forum/developers/xslt/22229-Breadcrumb-on-multiple-level#comment83515

    /Kim A

  • 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