helga-agentur/helga_breadcrumbs

Breadcrumbs for Helga

1.0.0-rc2 2025-07-31 12:56 UTC

This package is not auto-updated.

Last update: 2025-08-01 04:49:21 UTC


README

This module provides a generic strategy for generating breadcrumbs. It relies on MenuBreadcrumbBuilder, some custom fallback catch-all logic and EasyBreadcrumbBuilder to achieve the following:

  1. Generate a breadcrumb for the current entity based on its placement in a globally defined menu
  2. If there is no menu item for the current entity, fallback to a fallback menu item for 'orphans', defined per entity type
  3. If that doesn't work either, fallback to EasyBreadcrumb's logic
  4. If EasyBreadcrumb cannot be applied, use any other available system breadcrumb builder
    • N.B.: This depends on the priority of breadcrumb_builder tagged services.

Flow (created with mermaidchart.com)

REQUIREMENTS

  • Easy Breadcrumb
  • Menu Breadcrumb

CONFIGURATION

Helga breadcrumbs

Define the menu used to generate breadcrumbs, via helga_breadcrumbs.settings breadcrumbs_orphans_menu Having defined that, make sure you add fallback "orphan" parents menu items for node and other entity types, as needed.

Menu breadcrumbs

By setting determine_menu to true one can completely disable this builder, while still being able to use the module's codes for the 'orphans' fallback logic.

Easy breadcrumbs

Some suggested settings:

  • remove_repeated_segments: true
  • applies_admin_routes: false
  • include_title_segment: false
  • follow_redirects: false

NOTES

EasyBreadcrumb may have an issue with aliases generated using the following token:

[node:menu-link:parents:join-path]

In order to fix this issue (tracked at https://www.drupal.org/i/2952612), a patch is needed (provided via that issue) and some custom implementation.