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.
Is it possible to make the breadcrumbs configurable?
Use case:
We need to set the breadcrumbs based on an active container that holds an embedded FAQ. The Q/A page needs to represent this structure too. We are manually testing the category to determine the parent menu item.
This location targeting is done early on in the process as it controls many different parts of the system - access / theme / menu / breadcrumbs. The faq module overrides the breadcrumbs that are set at this early stage.
The supplied patch adds a configurable option for this, created from version 6.x-1.8.
Comment | File | Size | Author |
---|---|---|---|
#5 | no-breadcrumb-option.patch | 3.28 KB | Alan D. |
faq.diff | 3.57 KB | Alan D. | |
Comments
Comment #1
milos1234 CreditAttribution: milos1234 commentedhi, will this give me an active menu item when viewing a single faq node?
many thanks!
Comment #2
Alan D. CreditAttribution: Alan D. commentedNo, it adds an option to prevent the breadcrumbs being set.
We were using an inhouse custom input filter (@see Input filter tags for the FAQ), and we handled breadcrumbs directly. However, this patch, combined with custom breadcrumbs, could work.
If you implement and embed the tag in a page that has a breadcrumb trail, then this patch will meet your needs. I have had no feedback from the maintainer(s) on these issues yet.
Cheers
Comment #3
stella CreditAttribution: stella commentedIt looks like an alternative solution was committed in #362084: Breadcrumb modified when displaying FAQ on a page
Comment #4
buttonwillowsix CreditAttribution: buttonwillowsix commentedI too would like FAQ breadcrumbs to be a configurable option. I am using Custom Breadcrumbs on my site, but of course the FAQ breadrumbs trump everything. I don't want to apply a patch as I am handing this site off to another maintainer. Any chance Alan D's option might make it in to a future release?
Comment #5
Alan D. CreditAttribution: Alan D. commentedI guess I shouldn't have included two things in one patch:
The above patch done two things:
1) Prevented the breadcrumbs from showing on embedded pages (Duplicate)
2) Adds a flag to tell FAQ not to create a breadcrumb trail. I.e. The breadcrumbs are being set somewhere else and please do not override.
In our case it is within a hook_init() that sets up the context of the theme used for the site and the menu structure early so that everything else that requires this context just works without having to query other modules.
Flagging as "Needs work" as it is just an untested port of the module modifications that we've applied to the lattest release (6.x-1.11, not HEAD) that we have passed onto the client for testing (they are offen slow when giving feedback on updates running on their test server).
Cheers
Comment #6
stella CreditAttribution: stella commentedCommitted, thanks!
Comment #8
stella CreditAttribution: stella commentedReleased in 6.x-1.12.