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']);
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

B-Prod’s picture

Title: Solution for use with menu firstchild module » Allow other modules (e.g. menu_firstchild) to alter the menu item in breadcrumb
Version: 6.x-1.1 » 6.x-1.x-dev
Category: bug » feature
Status: Active » Needs review
FileSize
617 bytes

The 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

cbccharlie’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)