PHPackages                             youandmedigital/craft-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/craft-breadcrumb

Abandoned → [youandmedigital/breadcrumb](/?search=youandmedigital%2Fbreadcrumb)Craft-plugin[Templating &amp; Views](/categories/templating)

youandmedigital/craft-breadcrumb
================================

Generate a simple breadcrumb based on your URL segments

1.0.1(7y ago)641MITPHP

Since Feb 27Pushed 3mo ago2 watchersCompare

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

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

 [![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

36

—

LowBetter than 79% of packages

Maintenance54

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

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

Total

2

Last Release

2680d ago

### 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-plugincraft3craft4craft5navigationtwig

### Embed Badge

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

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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