tadcka / breadcrumbs
Breadcrumbs component
Installs: 1 125
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:component
Requires
- php: >=5.3.3
Requires (Dev)
- phpunit/phpunit: ~4.2
- squizlabs/php_codesniffer: ~1.5
This package is not auto-updated.
Last update: 2024-11-09 15:46:24 UTC
README
Breadcrumbs component.
Installation
Step 1: Download Breadcrumbs using composer
Add TadckaAddressBundle in your composer.json:
{ "require": { "tadcka/breadcrumbs": "dev-master" } }
Now tell composer to download the bundle by running the command:
$ php composer.phar update tadcka/breadcrumbs
Step 2: How use?
Create breadcrumb object:
<?php $breadcrumb = new \Tadcka\Component\Breadcrumbs\Breadcrumb(); $breadcrumb->add('acme', '/acme'); $breadcrumb->add('hello');
Render html with twig:
<ul class="breadcrumb"> {% for item in breadcrumb %} <li><a href="{{ item.url is not empty ? item.url : 'javascript:;' }}">{{ item.title }}</a></li> {% endfor %} </ul>