Reputation: 2968
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?
Upvotes: 1
Views: 4534
Reputation: 4604
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.
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.
Upvotes: 2