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.
When the Breadcrumb pane (available under "Page elements") is used to render the breadcrumbs, ctools_page_breadcrumb_content_type_render()
is executed before panels_breadcrumbs_ctools_render_alter()
, and therefore this module has no effect on the output.
Comment | File | Size | Author |
---|---|---|---|
#5 | panels_breadcrumbs-panels_get_current_page_handler.patch | 6.24 KB | devuo |
Comments
Comment #1
devuo CreditAttribution: devuo commentedThis is a known issue. There's no way to have our code execute before Breadcrumb content pane. The solution I used was to write my own implementation of the Breadcrumb content pane, which I called "Panels Breadcrumb" in a project I worked in recently. I'll add this in 7.x-1.5.
Comment #2
ghindle CreditAttribution: ghindle commentedAny chance you can attach this as patch now?
Comment #3
devuo CreditAttribution: devuo commentedI was looking into this today, and apparently the proper way to get this to work is by having Panels panel_context.inc patched and having it saving the current page handler in a static variable much like it does in
panels_get_current_page_display()
to something likepanels_get_current_page_handler()
(which currently doesn't exists) otherwise there's simply no way to get the "Panels Breadcrumbs" configuration except in a very complex, weird sort of way. I'll create a new issue on the Panels project issue queue with a feature request patch that adds this required functionality.Comment #4
devuo CreditAttribution: devuo commentedI'll set this as postponed until the patch to Panels has been commited.
Comment #5
devuo CreditAttribution: devuo commentedThe following patch adds the required functionality. Notice however it requires #1418598: Set page_manager_get_current_page() before the page render to be applied as well to Panels.
Comment #6
devuo CreditAttribution: devuo commentedPostponed until we've got news from Panels side.
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedThe patch to Panels should be unnecessary as page_manager_get_current_page() can be used instead.
Comment #8
devuo CreditAttribution: devuo commentedMerlin please see the referenced issue in Panels for the response.
Comment #9
dubois CreditAttribution: dubois commentedFYI @devuo, your abovementioned patches for Panels #1418598 & Panels Breadcrumbs apply cleanly to Panels 3.2 and Panels Breadcrumbs 1.6 to yield the desired behaviour.
My users find it very handy to use the breadcrumb pane as suggested by jweowu. Hope you and merlinofchaos agree on a way to implement this without patches. Thank you for a very useful little module.
Comment #10
devuo CreditAttribution: devuo commentedThis has been fixed in the latest 7.x-2.x-dev version.