breadcrumb menu not showing the trail
PermalinkI am experiencing a problem with the breadcrumb menu, and hope some of you are able to help.
The menu shows up fine on the first and second level: home / second level - but at det third level it is only showing the current page: third level.
In the block view all levels are shown in preview.
I am using this template:
<? defined('C5_EXECUTE') or die("Access Denied."); $navItems = $controller->getNavItems(true); // Ignore exclude from nav $c = Page::getCurrentPage(); if (count($navItems) > 0) { echo '<nav role="navigation" aria-label="breadcrumb">'; //opens the top-level menu echo '<ol class="breadcrumb">'; foreach ($navItems as $ni) { if ($ni->isCurrent) { echo '<li class="active">' . $ni->name . '</li>'; } else { echo '<li><a href="' . $ni->url . '" target="' . $ni->target . '">' . $ni->name . '</a></li>'; } } echo '</ol>'; echo '</nav>'; //closes the top-level menu
I have no clue to what is causing the problems I am experiencing and am eager to find a solution.
I would be happy for any hint in the right direction
I have include pictures of both second and third level.
As you can see, on the third level, the menu only display the cirrent page, not the trail.
I attached a screenshot of what the Breadcrumb template looks like.
Also, in the "Begin Auto Nav" drop down menu, you have "at the current level" selected. This will only show the current page and not its parent pages.
Click on the Auto-Nav block and choose Design & Custom Template from the popup menu. A new menu bar will appear, choose the gear icon "Custom CSS Classes, Block Name, Custom Templates and Reset Styles" on the right side. From the Custom Template drop down menu, select Breadcrumb.
The templates is only styling the output.
I still only get the current page name in the trail, when on third level or below.
To better explain your problem, can you include some screenshots?