PHPackages                             hoppinger/breadcrumb\_builder - 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. hoppinger/breadcrumb\_builder

ActiveDrupal-module[Utility &amp; Helpers](/categories/utility)

hoppinger/breadcrumb\_builder
=============================

Drupal module to build breadcrumbs

v1.3(5y ago)29.5k↓33.3%1GPL-2.0+PHP

Since Mar 5Pushed 8mo ago4 watchersCompare

[ Source](https://github.com/hoppinger/breadcrumb_builder)[ Packagist](https://packagist.org/packages/hoppinger/breadcrumb_builder)[ Docs](https://github.com/hoppinger/breadcrumb_builder)[ RSS](/packages/hoppinger-breadcrumb-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (8)Used By (0)

Breadcrumb Builder
==================

[](#breadcrumb-builder)

Navigation can greatly enhance the way users find their way around. In terms of usability, breadcrumbs reduce the number of actions a website visitor needs to take in order to get to a higher-level page, and they improve the findability of website sections and pages. They are also an effective visual aid that indicates the location of the user within the website’s hierarchy, making it a great source of contextual information for landing pages.

Installation
------------

[](#installation)

```
composer require hoppinger/breadcrumb_builder
```

Usage
-----

[](#usage)

Path Breadcrumb builder automatically recognizes the correct breadcrumb you want based on the URLs of the pages and the items included in the menu. In case of special breadcrumb trail requirement, you can extend the functionality of the Path breadcrumb builder and create your own breadcrumb trail.

Create a custom service and define the service in the modulename.services.yml file. Replace the ExampleBreadcrumbBuilder with your own filename. Add the priority to the custom breadcrumb builder.

```
  class: Drupal\module_name\ExampleBreadcrumbBuilder
    arguments: ['@plugin.manager.menu.link']
    tags:
      - { name: custom_breadcrumb_builder, priority: x }
```

Create a file ExampleBreadcrumbBuilder.php inside the &lt;module\_name&gt;/src folder and extend the Breadcrumb manager.

```
namespace Drupal\;

use Drupal\breadcrumb_builder\BreadcrumbBuilderInterface;
use Drupal\Core\Menu\MenuLinkInterface;
use Drupal\Core\Menu\MenuLinkManagerInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\breadcrumb_builder\BreadcrumbResult;

class ExampleBreadcrumbBuilder implements BreadcrumbBuilderInterface {
  //Variables

  public function __construct() {
    //Intitialize
  }

   /**
   * {@inheritdoc}
   */
  public function applies(RouteMatchInterface $route_match) {
    return TRUE;
  }

  public function build(RouteMatchInterface $route_match) {
    //Custom logic
  }
}
```

In some cases we need more menu types than the specified 'main' menu, to contribute to the breadcrumb generation.

Create a .php file in the module directory /src with the following content. Replace the `` with the project-specific menu type that needs to be embedded into the API response (for example: `footer`)

The &lt;target\_identifiers&gt; can be Menu types.

The filename must be similar to the module name i.e., ModuleNameServiceProvider.php and must be placed in the src folder.

```
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;
use Symfony\Component\DependencyInjection\Reference;

class AlterServiceProvider extends ServiceProviderBase {
  public function alter(ContainerBuilder $container) {
    if ($container->hasParameter('breadcrumb_builder.target_identifiers')) {
      $target_identifiers = $container->getParameter('breadcrumb_builder.target_identifiers');

      $target_identifiers[] = ; #e.g., footer

      $container->setParameter('breadcrumb_builder.target_identifiers', $target_identifiers);
  }
}
```

By default, main menu is already added as the target identifier.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance43

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 89.5% of commits — single point of failure

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

Recently: every ~518 days

Total

6

Last Release

246d ago

Major Versions

v1.3 → 10.x-dev2023-08-17

10.x-dev → 11.x-dev2025-09-12

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23648809?v=4)[Ashwini Mone](/maintainers/ashwinimone)[@ashwinimone](https://github.com/ashwinimone)

![](https://avatars.githubusercontent.com/u/10885177?v=4)[Giuseppe Maggiore](/maintainers/giuseppemag)[@giuseppemag](https://github.com/giuseppemag)

![](https://avatars.githubusercontent.com/u/5929758?v=4)[Amit Ajgaonkar](/maintainers/amitajgaonkar)[@amitajgaonkar](https://github.com/amitajgaonkar)

---

Top Contributors

[![ashwinimone](https://avatars.githubusercontent.com/u/23648809?v=4)](https://github.com/ashwinimone "ashwinimone (17 commits)")[![rolfvandekrol](https://avatars.githubusercontent.com/u/434397?v=4)](https://github.com/rolfvandekrol "rolfvandekrol (2 commits)")

### Embed Badge

![Health badge](/badges/hoppinger-breadcrumb-builder/health.svg)

```
[![Health](https://phpackages.com/badges/hoppinger-breadcrumb-builder/health.svg)](https://phpackages.com/packages/hoppinger-breadcrumb-builder)
```

###  Alternatives

[soluble/japha

Soluble PHP Java bridge integration

7343.5k3](/packages/soluble-japha)

PHPackages © 2026

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