tadcka/breadcrumbs

Breadcrumbs component

Installs: 1 125

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-11-09 15:46:24 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>