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.
page.html.twig prints a Breadcrumb variable but bootstrap.info.yml does not define a breadcrumb region, so I think it's a piece of unused code.
Comment | File | Size | Author |
---|---|---|---|
#4 | after-patch.png | 15.91 KB | bandanasharma |
#4 | before-patch.png | 18.89 KB | bandanasharma |
#2 | remove_breadcrumb_var-2871090-2.patch | 1005 bytes | JurriaanRoelofs |
Comments
Comment #2
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commented__
Comment #3
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedComment #4
bandanasharma CreditAttribution: bandanasharma as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commented#2 patch apply successfully. I have attached the some after and before attachment.
Comment #5
Christopher Riley CreditAttribution: Christopher Riley commentedCorrect me if I am wrong but shouldn't we maintain the breadcrumb region so that we stay true to form for the default page.html.twig api documentation etc.
Docs
Comment #6
markhalliwellYes/no. This really could go either way.
The current code that's in
page.html.twig
is because of the 7.x -> 8.x port.In 7.x, breadcrumbs were added as a variable in template_process_page().
This is the code that was converted and why it currently exists in
page.html.twig
. It's also why you see{{ breadcrumb }}
and not{{ page.breadcrumb }}
(which would be a region).In 8.x, after the theme process layer was removed, breadcrumbs were converted into a block after issues arose around its move to the preprocess layer. This is where a "dedicated region" for breadcrumbs was added as well.
Why it got its own region is actually quite unclear (my guess is because some people think they need regions for everything).
Breadcrumbs is now a block (kind of like its own mini-region) and wrapping it in even more region specific markup is completely unnecessary; especially in Bootstrap.
This block can be easily placed anywhere in any of the existing existing regions (as it is doing now in the header region).
As one who adamantly opposes tons of "specific regions" (think Omega), I'm in agreement that this should probably just be removed from
page.html.twig
.Also, this is really just a [cleanup] task, not a bug. It doesn't actually do anything or adversely affect any code/logic.
Comment #8
markhalliwell