- Install via composer
- Include
vendor/letsdrink/ouzo-breadcrumbs/helper/BreadcrumbHelper.php
inapplication/helper/ApplicationHelper.php
In controller action just add: Breadcrumb::add('Display name', '/sample/index');
to register a new entry.
To show generated HTML, call: <?= BreadcrumbHelper::showBreadcrumbs() ?>
.
You can pass attributes to breadcrumbs generator:
$attributes = array('class' => 'my-class', 'id' => 'breadcrumb-id');
echo BreadcrumbHelper::showBreadcrumbs($attributes);