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 14, 2011 @ 11:40
    Fuji Kusaka
    0

    Breadcrumb on multiple level

    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(XSLT Error when parsing ).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>
      </xsl:template>

     

    //fuji

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 14, 2011 @ 19:46
    Fuji Kusaka
    0

    Any help please?

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

    Hi Fuji

    Have you made sure that the page where the error occours have got the "linkToSubpage"-property filled out? If not, the NiceUrl-extension will fail.

    /Kim A

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 15, 2011 @ 08:39
    Fuji Kusaka
    0

    Hi Kim,

    No i dont think so....let me check this, and by the way its kind of weird, i remember deleting this post.

     

    //fuji

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 15, 2011 @ 08:47
    Fuji Kusaka
    0

    You were right, i completely forgot that i have a link "linkToSubpage" property field in other pages.....need to make some slight modifications in the breadcrumb.

     

    Thanks for pointing this out.

     

    //fuji

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

    Cool Fuji.

    Glad I could help...

    /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