Breadcrumbs component

v1.1.0 2014-12-17 15:04 UTC


Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads Latest Unstable Version License

Breadcrumbs component.


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:

$breadcrumb = new \Tadcka\Component\Breadcrumbs\Breadcrumb();
$breadcrumb->add('acme', '/acme');

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 %}