PHPackages                             youandmedigital/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. [Templating &amp; Views](/categories/templating)
4. /
5. youandmedigital/breadcrumb

ActiveCraft-plugin[Templating &amp; Views](/categories/templating)

youandmedigital/breadcrumb
==========================

Generate a simple breadcrumb

3.1.2(2mo ago)623.4k↓21.9%11MITPHPPHP ^8.0.2

Since Feb 27Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/youandmedigital/craft-breadcrumb)[ Packagist](https://packagist.org/packages/youandmedigital/breadcrumb)[ RSS](/packages/youandmedigital-breadcrumb/feed)WikiDiscussions craft-5 Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (16)Used By (1)

 [![Craft Breadcrumb](https://github.com/youandmedigital/craft-breadcrumb/raw/craft-4/src/icon.svg)](https://github.com/youandmedigital/craft-breadcrumb/blob/craft-4/src/icon.svg)

Breadcrumb for Craft CMS
========================

[](#breadcrumb-for-craft-cms)

Generate a simple breadcrumb.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 5 or later.

 [![Breadcrumb from URL](https://raw.githubusercontent.com/youandmedigital/craft-breadcrumb/craft-4/src/resources/plugin-banner.jpg)](https://raw.githubusercontent.com/youandmedigital/craft-breadcrumb/craft-4/src/resources/plugin-banner.jpg)

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

[](#installation)

To install the plugin, search for "Breadcrumb" in the Craft Plugin Store, or install manually using composer.

```
composer require youandmedigital/breadcrumb

```

Overview
--------

[](#overview)

This plugin will generate a simple breadcrumb array that you can style via Twig. It will generate crumb titles from the customFieldHandle setting if set, falling back to the title field. If none of these fields are present, it will generate the crumb title from the URL segment.

Breadcrumb works across different element types and is multisite friendly. It can even be used to generate `BreadcrumbList` [schema](https://developers.google.com/search/docs/data-types/breadcrumb#definitions).

Example
-------

[](#example)

Breadcrumb generates an array like this:

```
array (size=4)
  0 =>
    array (size=3)
      'title' => string 'Home' (length=4)
      'url' => string 'https://mysite.local' (length=18)
      'position' => int 1
  1 =>
    array (size=3)
      'title' => string 'Posts' (length=5)
      'url' => string 'https://mysite.local/posts' (length=24)
      'position' => int 2
  2 =>
    array (size=3)
      'title' => string 'Categories' (length=10)
      'url' => string 'https://mysite.local/posts/categories' (length=35)
      'position' => int 3
  3 =>
    array (size=3)
      'title' => string 'Example Category' (length=11)
      'url' => string 'https://mysite.local/posts/categories/example-category' (length=52)
      'position' => int 4

```

Use Twig to define the presentation and apply additional logic. Use whatever markup that suits your project best. Here's a basic example with no settings applied:

```
{% set breadcrumb = craft.breadcrumb.config %}

{% if breadcrumb %}

        {% for crumb in breadcrumb  %}
            {% if loop.last %}

                {{ crumb.title }}

            {% else %}

                    {{ crumb.title }}

            {% endif %}
        {% endfor %}

{% endif %}
```

Settings
--------

[](#settings)

Breadcrumb has the following settings available:

**homeTitle**`(string, optional, default 'Home')`Customise the title in the first segment of the breadcrumb.

**customBaseUrl**`(string, optional, default '@baseUrl')`Set a custom base URL for each crumb in the Breadcrumb array. Use a fully qualified URL without the trailing slash.

**customFieldHandle**`(string, optional, default 'null')`Specify a custom field handle to generate each crumb title. Requires the setting customFieldHandleEntryId to work.

**customFieldHandleEntryId**`(int, optional, default '0')`Required for customFieldHandle.

**lastSegmentTitle**`(string, optional, default 'null')`Customise the last crumb title in the Breadcrumb array. Useful when using custom routing.

**skipUrlSegment**`(int, optional, default 'null')`Skip a level or segment from the Breadcrumb array. For example, if you had the following URL `https://mysite.local/posts/categories/example-category` and you entered `3` as the value, it would remove `categories` from the array.

**limit**`(int, optional, default 'null')`Limit the amount of crumbs returned in the Breadcrumb array.

Example setup with settings applied:

```
{# If entry is empty, try category, tag and finally return null #}
{% set element = entry ?? category ?? tag ?? null %}

{# Breadcrumb settings array #}
{% set settings =
    {
        homeTitle: 'My Website',
        customBaseUrl: 'https://example.com/123',
        customFieldHandleEntryId: element.id,
        customFieldHandle: 'myCustomField',
        lastSegmentTitle: element.customMenuTitle ?? element.title,
        skipUrlSegment: 2,
        limit: 3
    }
%}

{# The settings array above is passed into the Breadcrumb config below #}
{% set breadcrumb = craft.breadcrumb.config(settings) %}

{% if breadcrumb %}

        {% for crumb in breadcrumb  %}
            {% if loop.last %}

                {{ crumb.title }}

            {% else %}

                    {{ crumb.title }}

            {% endif %}
        {% endfor %}

{% endif %}
```

Roadmap
-------

[](#roadmap)

PR &amp; FR welcome!

Brought to you by [You &amp; Me Digital](https://youandme.digital)

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance88

Actively maintained with recent releases

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity73

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

Recently: every ~315 days

Total

12

Last Release

62d ago

Major Versions

1.1.0 → 2.0.02022-10-03

1.1.2 → 3.0.02024-04-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46480517?v=4)[You &amp; Me Digital](/maintainers/youandmedigital)[@youandmedigital](https://github.com/youandmedigital)

---

Top Contributors

[![jonleverrier](https://avatars.githubusercontent.com/u/2373940?v=4)](https://github.com/jonleverrier "jonleverrier (163 commits)")

---

Tags

breadcrumbscraft-plugincraft3craft4craft5navigationtwigtemplatingdevelopmentcmsutilitiesCraftcraftcmscraft-pluginnavigationbreadcrumb

### Embed Badge

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

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

###  Alternatives

[lewisjenkins/craft-dynamic-fields

Populate Craft fields with dynamic data using the power of Twig.

14667.0k](/packages/lewisjenkins-craft-dynamic-fields)[nystudio107/craft-minify

A simple plugin that allows you to minify blocks of HTML, CSS, and JS inline in Craft CMS templates.

37461.2k29](/packages/nystudio107-craft-minify)[jalendport/craft-preparse

A fieldtype that parses Twig when an element is saved and saves the result as plain text.

1086.4k](/packages/jalendport-craft-preparse)[craftpulse/craft-colour-swatches

Let clients choose from a predefined set of colours and utilise associated colour codes and class names in your templates.

3530.8k2](/packages/craftpulse-craft-colour-swatches)[verbb/footnotes

Adds a footnotes feature to CKEditor fields and Twig templates.

213.3k](/packages/verbb-footnotes)

PHPackages © 2026

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