PHPackages                             prolix/breadcrumbs-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. prolix/breadcrumbs-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

prolix/breadcrumbs-bundle
=========================

A small breadcrumbs bundle for Symfony2

1.4.9(6y ago)018MITPHPPHP &gt;=5.3.2

Since Sep 10Pushed 6y agoCompare

[ Source](https://github.com/prolixtechnikos/BreadcrumbsBundle)[ Packagist](https://packagist.org/packages/prolix/breadcrumbs-bundle)[ Docs](https://github.com/whiteoctober/BreadcrumbsBundle)[ RSS](/packages/prolix-breadcrumbs-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (4)Versions (20)Used By (0)

This project is no longer maintained. If you are using it with Symfony &gt;= 4.3, you may want to use [this fork](https://github.com/mhujer/BreadcrumbsBundle) instead.

Installation
============

[](#installation)

1. Configure templating for your application if you haven't already. For example:

    ```
    # app/config/config.yml (Symfony get("white_october_breadcrumbs");

    $node = $category;

    while ($node) {
        $breadcrumbs->prependItem($node->getName(), "");

        $node = $node->getParent();
    }
}
```

If you do not want to generate a URL manually, you can easily add breadcrumb items passing only the route name with any required parameters, using the `addRouteItem()`and `prependRouteItem()` methods:

```
public function yourAction()
{
    $breadcrumbs = $this->get("white_october_breadcrumbs");

    // Pass "_demo" route name without any parameters
    $breadcrumbs->addRouteItem("Demo", "_demo");

    // Pass "_demo_hello" route name with route parameters
    $breadcrumbs->addRouteItem("Hello Breadcrumbs", "_demo_hello", [
        'name' => 'Breadcrumbs',
    ]);

    // Add "homepage" route link at the start of the breadcrumbs
    $breadcrumbs->prependRouteItem("Home", "homepage");
}
```

Configuration
=============

[](#configuration)

The following *default* parameters can be overriden in your `config.yml` or similar:

```
# app/config/config.yml
white_october_breadcrumbs:
    separator:          '/'
    separatorClass:     'separator'
    listId:             'wo-breadcrumbs'
    listClass:          'breadcrumb'
    itemClass:          ''
    linkRel:            ''
    locale:             ~ # defaults to null, so the default locale is used
    translation_domain: ~ # defaults to null, so the default domain is used
    viewTemplate:       'WhiteOctoberBreadcrumbsBundle::microdata.html.twig'
```

These can also be passed as parameters in the view when rendering the breadcrumbs - for example:

```
{{ wo_render_breadcrumbs({separator: '>', listId: 'breadcrumbs'}) }}
```

> **NOTE:** If you need more than one set of breadcrumbs on the same page you can use namespaces. By default, breadcrumbs use the `default` namespace, but you can add more. To add breadcrumbs to your custom namespace use `addNamespaceItem` / `prependNamespaceItem`or `addNamespaceRouteItem` / `prependNamespaceRouteItem` methods respectively, for example:

```
public function yourAction(User $user)
{
    $breadcrumbs = $this->get("white_october_breadcrumbs");

    // Simple example
    $breadcrumbs->prependNamespaceItem("subsection", "Home", $this->get("router")->generate("index"));

    // Example without URL
    $breadcrumbs->addNamespaceItem("subsection", "Some text without link");

    // Example with parameter injected into translation "user.profile"
    $breadcrumbs->addNamespaceItem("subsection", $txt, $url, ["%user%" => $user->getName()]);

    // Example with route name with required parameters
    $breadcrumbs->addNamespaceRouteItem("subsection", $user->getName(), "user_show", ["id" => $user->getId()]);
}
```

Then to render the `subsection` breadcrumbs in your templates, specify this namespace in the options:

```
{{ wo_render_breadcrumbs({namespace: "subsection"}) }}
```

Advanced Usage
==============

[](#advanced-usage)

You can add a whole array of objects at once

```
$breadcrumbs->addObjectArray(array $objects, $text, $url, $translationParameters);
```

```
objects:            array of objects
text:               name of object property or closure
url:                name of URL property or closure

```

Example:

```
$that = $this;
$breadcrumbs->addObjectArray($selectedPath, "name", function($object) use ($that) {
    return $that->generateUrl('_object_index', ['slug' => $object->getSlug()]);
});
```

You can also add a tree path

```
$breadcrumbs->addObjectTree($object, $text, $url = "", $parent = 'parent', array $translationParameters = [], $firstPosition = -1)
```

```
object:             object to start with
text:               name of object property or closure
url:                name of URL property or closure
parent:             name of parent property or closure
firstPosition:      position to start inserting items (-1 = determine automatically)

```

> **NOTE:** You can use `addNamespaceObjectArray` and `addNamespaceObjectTree` respectively for work with multiple breadcrumbs on the same page.

Overriding the template
=======================

[](#overriding-the-template)

There are two methods for doing this.

1. You can override the template used by copying the `Resources/views/microdata.html.twig` file out of the bundle and placing it into `app/Resources/WhiteOctoberBreadcrumbsBundle/views`, then customising as you see fit. Check the [Overriding bundle templates](http://symfony.com/doc/current/book/templating.html#overriding-bundle-templates) documentation section for more information.
2. Use the `viewTemplate` configuration parameter:

    ```
    {{ wo_render_breadcrumbs({ viewTemplate: "YourOwnBundle::yourBreadcrumbs.html.twig" }) }}
    ```

> **NOTE:** If you want to use the JSON-LD format, there's already an existing template at `WhiteOctoberBreadcrumbsBundle::json-ld.html.twig`. Just set this template as the value for `viewTemplate` either in your Twig function call (see Step 2 above) or in your bundle [configuration](#configuration).

Contributing
============

[](#contributing)

We welcome contributions to this project, including pull requests and issues (and discussions on existing issues).

If you'd like to contribute code but aren't sure what, the [issues list](https://github.com/whiteoctober/breadcrumbsbundle/issues) is a good place to start. If you're a first-time code contributor, you may find Github's guide to [forking projects](https://guides.github.com/activities/forking/) helpful.

All contributors (whether contributing code, involved in issue discussions, or involved in any other way) must abide by our [code of conduct](https://github.com/whiteoctober/open-source-code-of-conduct/blob/master/code_of_conduct.md).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~127 days

Recently: every ~15 days

Total

19

Last Release

2389d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/207179?v=4)[kuldippujara](/maintainers/kuldippujara)[@kuldippujara](https://github.com/kuldippujara)

---

Top Contributors

[![richsage](https://avatars.githubusercontent.com/u/231551?v=4)](https://github.com/richsage "richsage (60 commits)")[![balazslevi](https://avatars.githubusercontent.com/u/12248065?v=4)](https://github.com/balazslevi "balazslevi (16 commits)")[![bocharsky-bw](https://avatars.githubusercontent.com/u/3317635?v=4)](https://github.com/bocharsky-bw "bocharsky-bw (16 commits)")[![mhujer](https://avatars.githubusercontent.com/u/353372?v=4)](https://github.com/mhujer "mhujer (6 commits)")[![toooni](https://avatars.githubusercontent.com/u/241080?v=4)](https://github.com/toooni "toooni (5 commits)")[![ravindrakhokharia](https://avatars.githubusercontent.com/u/2654612?v=4)](https://github.com/ravindrakhokharia "ravindrakhokharia (4 commits)")[![sampart](https://avatars.githubusercontent.com/u/1507328?v=4)](https://github.com/sampart "sampart (3 commits)")[![andrewmy](https://avatars.githubusercontent.com/u/715595?v=4)](https://github.com/andrewmy "andrewmy (3 commits)")[![micotodev](https://avatars.githubusercontent.com/u/1260246?v=4)](https://github.com/micotodev "micotodev (2 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (2 commits)")[![dxops](https://avatars.githubusercontent.com/u/1804871?v=4)](https://github.com/dxops "dxops (2 commits)")[![quentin-st](https://avatars.githubusercontent.com/u/1551971?v=4)](https://github.com/quentin-st "quentin-st (2 commits)")[![Simounet](https://avatars.githubusercontent.com/u/582666?v=4)](https://github.com/Simounet "Simounet (2 commits)")[![Nickinthebox](https://avatars.githubusercontent.com/u/2796997?v=4)](https://github.com/Nickinthebox "Nickinthebox (1 commits)")[![cocolabssas](https://avatars.githubusercontent.com/u/18029169?v=4)](https://github.com/cocolabssas "cocolabssas (1 commits)")[![imctomhv](https://avatars.githubusercontent.com/u/24391197?v=4)](https://github.com/imctomhv "imctomhv (1 commits)")[![Daamian](https://avatars.githubusercontent.com/u/6651750?v=4)](https://github.com/Daamian "Daamian (1 commits)")[![COil](https://avatars.githubusercontent.com/u/177844?v=4)](https://github.com/COil "COil (1 commits)")[![wickedOne](https://avatars.githubusercontent.com/u/343850?v=4)](https://github.com/wickedOne "wickedOne (1 commits)")[![soullivaneuh](https://avatars.githubusercontent.com/u/1698357?v=4)](https://github.com/soullivaneuh "soullivaneuh (1 commits)")

---

Tags

symfonybreadcrumbs

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/prolix-breadcrumbs-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/prolix-breadcrumbs-bundle/health.svg)](https://phpackages.com/packages/prolix-breadcrumbs-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

9410.7k](/packages/ahmed-bhs-doctrine-doctor)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k13](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
