Developer forum

Forum » Rapido » Breadcrumb only visible if parent is not hidden

Breadcrumb only visible if parent is not hidden

Michael Fenech-Andersen
Reply

I'm creating a site based off Rapido but unsure whether this is a Rapido thing/feature. 

I would like all pages to have breadcrumb but when my parent is hidden it doesn't show breadcrumb. 

  • Parent A
  • Parent B
    • Child BA
      • Grandchild BAA
    • Child BC
  • Parent C

If Parent B is "Hide in menu" the breadcrumb does not show up on grandhild BAA.

Is it possible to get it to show up?
And is it possible to hide it with a path like "Child BA > Grandchild BAA"? (Checking and unchecking "Show in breadcrumb trail" does not seem to have an effect. 


Replies

 
Nicolai Pedersen
Reply

Hi Michael

Currently not - the way it works is that we do not skip a level that is not active or shown in product list, but stops the processing.

It is possible though - but you have to create your own XSLT template for the breadcrump navigation where you set the sitemap setting to false, and do the sitemap filtering in the XSLT instead.

BR Nicolai

 
Michael Fenech-Andersen
Reply

Thanks - I ended up flipping your suggestion but it did the trick for me.

1. Get children of "Hide in menu" pages to show up in breadcrumb. 

I changed Page.cshtml to include sitemapmode:

        @RenderNavigation(new
        {
            id = "breadcrumb",
          sitemapmode = true,
          //template = "Breadcrumb.xslt"
          template = "Breadcrumb_custom.xslt"
        })
It created the desired behaviour for me but I guess there is a good reason why breadcrumb and sitemap don't have the same logic by default. 
 
2. Don't show the "Hide in menu" parent page in breadcrumb
Based on the suggestion here I use a navigationtag that I then use in XSLT to hide pages with in the breadcrumb. 

 

You must be logged in to post in the forum