breadcrumb menu not showing the trail

Permalink
Hi

I 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

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi tilde,

To better explain your problem, can you include some screenshots?
tilde replied on at Permalink Reply 4 Attachments
Sure - It's an odd problem, I think.

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.
MrKDilkington replied on at Permalink Reply 1 Attachment
MrKDilkington
It appears that you aren't applying the Breadcrumb template.

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.
tilde replied on at Permalink Reply
Yes - I am not in the attached screen dumps - but is really doesn't make any changes whether I use the template or not.
The templates is only styling the output.
I still only get the current page name in the trail, when on third level or below.