tadcka/breadcrumbs

Breadcrumbs component

Installs: 1 124

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:component

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

This package is not auto-updated.

Last update: 2024-10-26 15:41:13 UTC


README

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

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>