Copied to clipboard

Flag this post as spam?

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


  • Roger 195 posts 474 karma points
    Dec 20, 2012 @ 20:40
    Roger
    0

    Breadcrumbs on restricted public access pages

    Hi all,

    I have hidden pages available only when logged in to the site. The main page when logged in and subsequent course pages as children of the main page. They both use different document types and templates. They are restricted using public access.

    I need to start a breadcrumb trail from the logged in page and have that displayed right through the heirarchy. This could go down 4 or 5 levels from the logged in main page.

    I created a duplicate master page template for them and used the breadcrumbs xslt and macro provided by Umbraco and inserted the Macro into the Master page template.

    The issue is that once I am on the main logged in page, the breadcrumb navigation displays as it should but when I click to open one of the child pages, only the current page is being displayed in the trail, there is no link back to the previous page.

    Any ideas please?

    Thanks

    Roger

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Dec 20, 2012 @ 21:25
    Jan Skovgaard
    0

    Hi Roger

    What does the code for you breadcrumb look like?

    /Jan

  • Roger 195 posts 474 karma points
    Dec 20, 2012 @ 21:40
    Roger
    0

    Hi Jan,

    I just used the breadcrumb xslt template from the dropdown list in Umbraco. Do I need to modify it?

     

    Roger

  • Roger 195 posts 474 karma points
    Jan 04, 2013 @ 14:42
    Roger
    0

    Hi Jan,

    Did you have any ideas on what i'm doing wrong here? I must need something else in the xslt maybe?

    Thanks

    Roger

  • Nigel Wilson 939 posts 2061 karma points
    Jan 04, 2013 @ 19:24
    Nigel Wilson
    0

    Hi Roger

    It would be very useful to provide your code as requested by Jan. The benefits are:

    1. Anyone trying to help you will be working with definite code (programmers like something absolute to view)
    2. Anyone trying to help will not have to delve into Umbraco to find the code, and then only guess that your code exactly matches the default code in Umbraco.

    Please post your code in here - you will then stand a better chance of receiving some help.

    Cheers, Nigel

  • Roger 195 posts 474 karma points
    Jan 07, 2013 @ 13:50
    Roger
    0

    Sorry Nigel, here you are:

    <xsl:output method="xml" omit-xml-declaration="yes"/>

      <xsl:param name="currentPage"/>

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

      <xsl:template match="/">

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

     

    As I mentioned, the Macro is in a master template.

    I need to start a breadcrumb trail from the logged in page and have that displayed right through the heirarchy. This could go down 4 or 5 levels from the logged in main page.

    I created a duplicate master page template for them and used the breadcrumbs xslt and macro provided by Umbraco and inserted the Macro into the Master page template.

    The issue is that once I am on the main logged in page, the breadcrumb navigation displays as it should but when I click to open one of the child pages, only the current page is being displayed in the trail, there is no link back to the previous page.

     

  • Roger 195 posts 474 karma points
    Jan 07, 2013 @ 14:56
    Roger
    100

    I have it working now.

    The template xslt for the breadcrumbs works fine. It was the parent page hidden from navigation that was causing the issue.

    Roger

  • 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