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.
Allow administrators to disable breadcrumbs for all paths that aren't affected by patch breadcrumbs, effectively disabling breadcrumbs from other modules, including drupal core.
It should be a setting turned off by default so as not to affect existing sites.
Comment | File | Size | Author |
---|---|---|---|
#7 | path_breadcrumbspath_breadcrumbs-disable_other-2483091-7.patch | 2.38 KB | rooby |
Comments
Comment #1
Snehal Brahmbhatt CreditAttribution: Snehal Brahmbhatt at AddWeb Solution Pvt. Ltd. commentedHi rooby,
Reviewed your requirement and you can use this module for your purpose:
https://www.drupal.org/project/disable_breadcrumbs
Let me know if you face any query/concern regarding this.
Thanks,
Comment #2
Snehal Brahmbhatt CreditAttribution: Snehal Brahmbhatt at AddWeb Solution Pvt. Ltd. commentedComment #3
kalabroHey @rooby! Thanks for your request!
At the moment PB can't disable another's breadcrumbs (from core or other contribs). It designed not to break other stuff. However patches are welcome :)
Thanks for the link @snehal.brahmbhatt! I haven't seen this module.
Marking as a feature request. Removing unnecessary tags.
Comment #4
kalabroComment #5
rooby CreditAttribution: rooby commentedThanks for the quick replies.
After a quick look at the code it actually shouldn't be that hard to implement.
I'm hoping I could get away with just adding a setting that controls some logic in the path_breadcrumbs_set_breadcrumb() function to null the breadcrumb for pages that return false from path_breadcrumbs_load_variant().
I need this for a current project so I'll see if it works later today and make a patch if it succeeds.
Comment #6
rooby CreditAttribution: rooby commentedHere's a patch that works from my initial tests but I will do some more thorough testing soon.
Comment #7
rooby CreditAttribution: rooby commentedHere's an updated version of the patch that also properly handles error pages when path breadcrumbs are disabled on error pages.
With the old version of the patch breadcrumbs would still show on error pages in this case.
Comment #8
rooby CreditAttribution: rooby commentedOops, crummy patch name :)
Comment #9
todea CreditAttribution: todea commentedI made a quick edit to this patch so that it doesn't knock out breadcrumbs for admin themed pages.