CMS Development

russelltnails
Participant

Hide Breadcrumb Menu if there is only one page level

Hello, 

 

I am trying to find the proper parameter to target in order to hide a breadcrumb menu if only on one page level. 

 

I've added the menu to a global group using the following:

{% menu "breadcrumb_menu" root_type='breadcrumb', flow='horizontal' %}

 

And added that group to all the templates across the entire site.

 

The following example is from a blog listing page

Because there is no logic to hide the menu at that page level, it creates repetitiveness with the page title - something that I'd like to avoid.

 

The CSS that renders to the page for that menu item is "last-crumb"

This is an example of the menu with some page heirarchy  

The CSS that renders on this page is "first-crumb" and "last-crumb"

 

I'm thinking if I write a condition that displays the {% menu %} only when there is the presence of a first-crumb CSS class, that this will resolve my issue. 

I have tried {% if content.widgets.breadcrumb_menu.body.value == 'first-crumb' %}

however this did not work

 

any suggestions here?

0 Upvotes
1 Reply 1
roisinkirby
HubSpot Product Team
HubSpot Product Team

Hide Breadcrumb Menu if there is only one page level

Hey @russelltnails is this still something you are working on or were you able to find a solution? If not I'm happy to connect you with some of our design experts Smiley Happy

0 Upvotes