Developer forum

Forum » Development » Breadcrumb not showing hidden pages

Breadcrumb not showing hidden pages

Jon Lennryd
Reply
Hi, I wonder how breadcrumbs works in dw when it comes to hidden pages. I have some pages which I don't want in the menu, so I deselected the 'Show in menu' check box for the page. Fine. There is also a check box named 'Show in breadcrumb trail', which I leave selected, expecting it to show up in the breadcrumb. However, it does not. I am kinda lost. :P

Below is the xslt-file I use to generate the breadcrumb. Named Breadcrumb.xslt, and I believe it is the 'original' file coming with the dw installation.

Thanks for any help!

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Description: ul/li based navigation. No features from admin implemented. Recommended settings: Fold out: True or False Upper menu: Dynamic or Static First level: > 0 Last level: >= First level -->
<xsl:output encoding="utf-8" indent="yes" omit-xml-declaration="yes" method="xml"/>
  <xsl:param name="html-content-type"/>

  <xsl:template match="/NavigationTree">
    <xsl:if test="count(//Page) > 0">
      <xsl:apply-templates select="//Page[@InPath='True']">
        <xsl:with-param name="depth" select="1"/>
      </xsl:apply-templates>
    </xsl:if>
  </xsl:template>

  <xsl:template match="//Page[@InPath='True']">
    <xsl:param name="depth"/>
    <div class="breadcrumblink">
      <a>
      <xsl:attribute name="class">
        <xsl:if test="@Active='True'">activeitem</xsl:if>
      </xsl:attribute>
      <xsl:attribute name="href">
        <xsl:value-of select="@FriendlyHref" disable-output-escaping="yes"/>
      </xsl:attribute>
      <xsl:value-of select="@MenuText" disable-output-escaping="yes"/>
      </a><xsl:text>&#160;</xsl:text> > <xsl:text>&#160;</xsl:text>
    </div>
  </xsl:template>
</xsl:stylesheet>

Replies

 
Vladimir
Reply
Hi Jon!
I'm afraid this option 'Show in breadcrumb trail' works only for 'Published' pages

Best regards,
Vladimir

 
Jon Lennryd
Reply
Ouch, that's not a good answer Vladimir. :P
Anyone has a good idea of how to solve this? I don't have 'friendly url' turned on, so I really don't know how to fetch this information from dw..

It would be nice if I could use some dw tags available, but as the <!--@Global:Pageview.Url--> show something like 'Default.aspx?ID=225', I really don't have any information about the web page-structure. I will turn on friendly url later, but need the page to work without it as well.
 
Nicolai Høeg Pedersen
Reply
Hi Jon

If you are using the latest service release you can set sitemapmode=true on your settings.

<ul class="dwnavigation" settings="sitemapmode=true;othersettings...">

The "hidden" navigation items will be part of the XML, but not nodes which do not have show in sitemap set.

 

You must be logged in to post in the forum