Use Case: Curated Crumbs breadcrumb based on an Entity Reference parent and a custom breadcrumb title

Last updated on
30 April 2025

In some cases, a content editor might want tight control over the breadcrumb that shows up on each page of the site while still maintaining consistency across the site. There are lots of different breadcrumb modules, but this how-to will go over creating a curated breadcrumb using Crumbs, Entity Reference, and a custom text field.

Modules

  1. Install Crumbs 7.x-2.0-dev (this branch has caching)
  2. Install Entity Reference

Content

  1. Add an Entity Reference field to all content types called Breadcrumb Parent (field_breadcrumb_parent)
    This field should be single-value, otherwise it won't work!
  2. Add a text field to all content types called Breadcrumb Title (field_breadcrumb_title)
  3. Add some content and set the Breadcrumb Parent and Breadcrumb Title so that some nodes are in a hierarchy

Configure Crumbs plugins

  1. Go to the main crumbs admin page: admin/structure/crumbs
  2. Drag two items from the Inherit / automatic section into the Enabled section:
    • text.field_breadcrumb_title.*
    • entityreference.field_breadcrumb_parent.*
  3. If you don't see your plugin, try clearing your cache
  4. Save the configuration
  5. Clear your cache (not sure if you need it)

Testing

  1. Go to your content and see if the breadcrumb is based on your parent and title fields
  2. If not, try clearing cache and try the crumbs debug page: admin/structure/crumbs/debug

Help improve this page

Page status: Not set

You can: