PHPackages                             whiteoctober/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. whiteoctober/breadcrumbs-bundle

Abandoned → [mhujer/breadcrumbs-bundle](/?search=mhujer%2Fbreadcrumbs-bundle)ArchivedSymfony-bundle[Utility &amp; Helpers](/categories/utility)

whiteoctober/breadcrumbs-bundle
===============================

A small breadcrumbs bundle for Symfony2

1.4.5(6y ago)1872.5M↓14.5%69[8 issues](https://github.com/sampart/BreadcrumbsBundle/issues)11MITPHPPHP &gt;=5.3.2

Since Sep 10Pushed 5y ago24 watchersCompare

[ Source](https://github.com/sampart/BreadcrumbsBundle)[ Packagist](https://packagist.org/packages/whiteoctober/breadcrumbs-bundle)[ Docs](https://github.com/whiteoctober/BreadcrumbsBundle)[ RSS](/packages/whiteoctober-breadcrumbs-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (16)Used By (11)

> WARNING: 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).

*(This project was originally at )*

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity57

Moderate usage in the ecosystem

Community41

Growing community involvement

Maturity66

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 ~159 days

Recently: every ~149 days

Total

15

Last Release

2404d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3004d961143812c87d7ef7ff2fe053baebe5902db9881a6f29406fff4702a478?d=identicon)[olorton](/maintainers/olorton)

![](https://www.gravatar.com/avatar/664733429c68e675ccc0bc85ad272c4e0dcae3f838abbf5a33d53b37deffdcec?d=identicon)[sampart](/maintainers/sampart)

![](https://www.gravatar.com/avatar/428a73d9e101bfa04ed7d76181d188735891d99ba4d5592f743dc7c87f889315?d=identicon)[richsage](/maintainers/richsage)

---

Top Contributors

[![richsage](https://avatars.githubusercontent.com/u/231551?v=4)](https://github.com/richsage "richsage (60 commits)")[![bocharsky-bw](https://avatars.githubusercontent.com/u/3317635?v=4)](https://github.com/bocharsky-bw "bocharsky-bw (17 commits)")[![balazslevi](https://avatars.githubusercontent.com/u/12248065?v=4)](https://github.com/balazslevi "balazslevi (16 commits)")[![mhujer](https://avatars.githubusercontent.com/u/353372?v=4)](https://github.com/mhujer "mhujer (6 commits)")[![sampart](https://avatars.githubusercontent.com/u/1507328?v=4)](https://github.com/sampart "sampart (6 commits)")[![toooni](https://avatars.githubusercontent.com/u/241080?v=4)](https://github.com/toooni "toooni (5 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)")[![modywzm](https://avatars.githubusercontent.com/u/1086434?v=4)](https://github.com/modywzm "modywzm (1 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)")[![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)")[![sweoggy](https://avatars.githubusercontent.com/u/5914253?v=4)](https://github.com/sweoggy "sweoggy (1 commits)")

---

Tags

symfony-bundlesymfonybreadcrumbs

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[winzou/state-machine-bundle

Bundle for the very lightweight yet powerful PHP state machine

34010.4M15](/packages/winzou-state-machine-bundle)[pentatrion/vite-bundle

Vite integration for your Symfony app

2755.3M13](/packages/pentatrion-vite-bundle)[maba/webpack-bundle

Bundle to Integrate Webpack to Symfony

123268.2k4](/packages/maba-webpack-bundle)[jbtronics/settings-bundle

A symfony bundle to easily create typesafe, user-configurable settings for symfony applications

9546.7k2](/packages/jbtronics-settings-bundle)[slope-it/breadcrumb-bundle

A bundle for generating dynamic breadcrumbs in Symfony applications

1865.5k](/packages/slope-it-breadcrumb-bundle)

PHPackages © 2026

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