Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Viewing elements that not belong to any menu, the breadcrumb is always empty or just a link to homepage. And there's no possibiliy to have a fallback.
Proposed resolution
Add a textarea on configuration form to allow a list of path prefix and check them on the apply method.
User interface changes
A new textarea field on the configuration form.
API changes
NA
Data model changes
New configuration variable: disable_aliases
Comments
Comment #2
alvar0hurtad0Comment #3
rphair CreditAttribution: rphair at COSD commentedWe are not going to do this because, when a page does "not belong to any menu":
1) the default Drupal 8 path based breadcrumb builder will provide a path based breadcrumb, complete except for any path components for inaccessible pages. Therefore the Problem statement is incorrect, since the fallback is the path based breadcrumb builder.
2) similarly, you are free to add another breadcrumb builder to take over when there's no applicable menu-based breadcrumb for either the current page or its taxonomy parent. It is beyond the scope of Menu Breadcrumb to provide breadcrumbs that aren't related in some way to menu membership.
You might take a look at feature request 2804943 to see what you can do by setting the active trail according to context. Failing that, you could also write a lightweight module to provide a default breadcrumb as you describe, for the cases Menu Breadcrumb won't handle.
Comment #4
alvar0hurtad0Thanks for your reply and the support.