PHPackages                             lcharette/uf\_breadcrumb - 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. lcharette/uf\_breadcrumb

ArchivedUserfrosting-sprinkle[Utility &amp; Helpers](/categories/utility)

lcharette/uf\_breadcrumb
========================

Breadcrumb service provider for UserFrosting V4

3.0.0(6y ago)21.5k1[1 PRs](https://github.com/lcharette/UF_Breadcrumb/pulls)MITPHPPHP &gt;=7.1

Since Jun 26Pushed 1w ago1 watchersCompare

[ Source](https://github.com/lcharette/UF_Breadcrumb)[ Packagist](https://packagist.org/packages/lcharette/uf_breadcrumb)[ Docs](https://github.com/lcharette/UF_Breadcrumb)[ Fund](https://ko-fi.com/lcharette)[ RSS](/packages/lcharette-uf-breadcrumb/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)DependenciesVersions (5)Used By (0)

Breadcrumb Sprinkle for [UserFrosting 4](https://www.userfrosting.com)
======================================================================

[](#breadcrumb-sprinkle-for-userfrosting-4)

[![Donate](https://camo.githubusercontent.com/b7dc459938f321309f24018c6839ab1a99d6f0233f063a741ce7be1f607b88f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d4275792532304d6525323061253230436f666665652d626c75652e737667)](https://ko-fi.com/A7052ICP)[![Latest Version](https://camo.githubusercontent.com/9a2aa6fea7a905cf4a51360d0aa684d8b820ef85bcb1b9b46281d9ce4c706915/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6c63686172657474652f55465f42726561646372756d622e737667)](https://github.com/lcharette/UF_Breadcrumb/releases)[![UserFrosting Version](https://camo.githubusercontent.com/d243b113a8b1764f50f7668212d970eb996110109b81aae3c24363ffb37baaab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5573657246726f7374696e672d2533453d253230342e332d627269676874677265656e2e737667)](https://github.com/userfrosting/UserFrosting)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Build](https://github.com/lcharette/UF_Breadcrumb/workflows/Build/badge.svg?branch=master)](https://github.com/lcharette/UF_Breadcrumb/actions?query=workflow%3ABuild)[![Codecov](https://camo.githubusercontent.com/a22b158303efbde565fd70a56117f6750fcc6a3dccdf04e82fb2aa3f696ef98d/68747470733a2f2f636f6465636f762e696f2f67682f6c63686172657474652f55465f42726561646372756d622f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/lcharette/UF_Breadcrumb)[![StyleCI](https://camo.githubusercontent.com/e1f9deaecaf89a9baebf60883aa38b4fca3c9ef0a83f0f5ed0fa63b069b798b5/68747470733a2f2f7374796c6563692e696f2f7265706f732f37303939343930322f736869656c643f6272616e63683d6d6173746572267374796c653d666c6174)](https://styleci.io/repos/70994902)

This Sprinkle provides an helper service and Twig template to manage simple page breadcrumb for [UserFrosting 4](https://www.userfrosting.com).

Caution

This project has been archived. The features provided by this project are now built-in **UserFrosting 6**.

Help and Contributing
=====================

[](#help-and-contributing)

If you need help using this sprinkle or found any bug, feels free to open an issue or submit a pull request. You can also find me on the [UserFrosting Chat](https://chat.userfrosting.com/) most of the time for direct support.

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

[](#installation)

Edit UserFrosting `app/sprinkles.json` file and add the following to the `require` list : `"lcharette/uf_breadcrumb": "^3.0.0"`. Also add `Breadcrumb` to the `base` list. For example:

```
{
    "require": {
        "lcharette/uf_breadcrumb": "^3.0.0"
    },
    "base": [
        "core",
        "account",
        "admin",
        "Breadcrumb"
    ]
}
```

Run `composer update` then `php bakery bake` to install the sprinkle.

Usage
-----

[](#usage)

### Adding crumbs

[](#adding-crumbs)

Breadcrumbs hierarchy needs to be manually defined in each controllers. To dynamically add breadcrumbs to the UI, simply use the `add` method of the `breadcrumb` service:

```
// add($name, $uri = "")
$this->ci->breadcrumb->add('Item name', 'path/');
```

You can also chain multiple methods :

```
$this->ci->breadcrumb->add("Projects", "projects/")
                     ->add("Project Foo", "projects/foo")
                     ->add("Settings");
```

The crumbs can also be created using the `Crumb` object :

```
$crumb = new Crumb();
$crumb->setTitle('Item name')->setUri('path/');
$this->ci->breadcrumb->addCrumb($crumb);
```

The item name can also be switched for a translation key :

```
$this->ci->breadcrumb->add(['TRANSLATION_KEY', ['placeholder' => 'Value']], 'path/');

// or

$crumb = new Crumb();
$crumb->setTitle('TRANSLATION_KEY', ['placeholder' => 'Value'])->setUri('path/');
```

Path is actually optional if you don't want to provide a link with your crumb. Alternatively, a route name / route pattern placeholders can also be used :

```
$this->ci->breadcrumb->add('Item name', ['route_name', ['id' => '123']]);

// or

$crumb = new Crumb();
$crumb->setTitle('Item name')->setRoute('route_name', ['id' => '123']);
```

### Prepend crumbs

[](#prepend-crumbs)

You can also use the `prepend` method to add a new item to the beginning of the list:

```
//prepend($name, $uri = "")
$this->ci->breadcrumb->prepend("Item name", "path/");

// or

$this->ci->breadcrumb->prependCrumb($crumb);
```

Note that the site index is automatically added to the beginning of the list, whether you use `prepend` or not.

**If you don't add any custom breadcrumbs, it will fallback to the default UserFrosting behaviour.**

Custom style
------------

[](#custom-style)

The default UserFrosting layouts and themes will pick up the breadcrumbs automatically. If your UserFrosting theme doesn't include breadcrumbs automatically, simply add this line to your twig files:

```
{% include 'navigation/breadcrumb.html.twig' with {page_title: block('page_title')} %}
```

If you want to edit the style of the breadcrumbs, simply copy the `templates/navigation/breadcrumb.html.twig` file in your own sprinkle and edit according to your styling. No custom assets are included with this sprinkle.

Licence
=======

[](#licence)

By [Louis Charette](https://github.com/lcharette). Copyright (c) 2020, free to use in personal and commercial software as per the MIT license.

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance64

Regular maintenance activity

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~514 days

Total

3

Last Release

2261d ago

Major Versions

2.0.1 → 3.0.02020-04-21

PHP version history (2 changes)2.0.0PHP &gt;=5.6

3.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2566513?v=4)[Louis Charette](/maintainers/lcharette)[@lcharette](https://github.com/lcharette)

---

Top Contributors

[![lcharette](https://avatars.githubusercontent.com/u/2566513?v=4)](https://github.com/lcharette "lcharette (56 commits)")

---

Tags

userfrostinguserfrosting-sprinklebreadcrumbsuserfrosting

### Embed Badge

![Health badge](/badges/lcharette-uf-breadcrumb/health.svg)

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

###  Alternatives

[glhd/gretel

270349.6k5](/packages/glhd-gretel)[creitive/breadcrumbs

Simple breadcrumbs class

86469.8k7](/packages/creitive-breadcrumbs)[robertboes/inertia-breadcrumbs

Laravel package to automatically share breadcrumbs to Inertia

59142.1k1](/packages/robertboes-inertia-breadcrumbs)[contributte/menu-control

Menu control for Nette framework

29112.2k1](/packages/contributte-menu-control)[formfeed-uk/nova-breadcrumbs

A Laravel Nova package to extend the capabilities of the first party Nova Breadcrumbs

19179.6k](/packages/formfeed-uk-nova-breadcrumbs)[carrooi/nette-menu

Menu control for Nette framework

2950.5k1](/packages/carrooi-nette-menu)

PHPackages © 2026

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