views:

488

answers:

1

I use HtmlHelper from CakePHP to create breadcrumbs navigation for my page... And i set $html->getCrumbs('separator', 'Home Page') to default.ctp and in other views i set $html->addCrumbs('nameLink', 'linkUrl'); All works fine!

But when I open my Home Page there is no breadcrumbs, why?

A: 

Extremely obvious answer, but does your homepage view have any calls to $html->addCrumb()? Regardless of whether you pass "Home Page" as the second parameter to $html->getCrumbs(), if you haven't added any crumbs in your view, $html->getCrumbs() will output nothing.

See the method definition.

The purpose of the second parameter of $html->getCrumbs() is to output something like "Breadcrumbs:" or "How you got here:", not to display the first of your crumbs.

Daniel Wright