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 you use menu firstchild module and menu trails, the breadcrumb have got wrong links. For example: "/es/"
I change menutrails.module and now the breadcrumb is well (line 106/107).
foreach ($above as $trail_item) {
+ if($trail_item['link']['link_path'] == '<firstchild>'){
+ $trail_item['link']['link_path'] = _menu_firstchild_get_firstchild_href($trail_item['link']['mlid']);
+ }
$crumbs[] = l($trail_item['link']['link_title'], $trail_item['link']['link_path']);
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal-alter-breadcrumb-items-1109022-1.patch | 617 bytes | B-Prod |
Comments
Comment #1
B-Prod CreditAttribution: B-Prod commentedThe patch below adds a hook_menutrails_menu_item_alter which allows other modules to modify the menu items in the breadcrumb.
I implemented this solution (drupal_alter) because I do not think menutrails should take care of a specific module like menu_firstchild, but should give a way for such modules (I also think to special menu items module) to interfere with the breadcrumb directly.
The related patch (the hook implementation) for menu_firstchild can be found there: #1134270: Ensure compatibility with menutrails module
Comment #2
cbccharlie CreditAttribution: cbccharlie commented