As per the title, using drupal_set_breadcrumb() affects breadcrumbs but not the chain of "active" or "expanded" menu items. Generally I always want to get both. The attached patch against 1.2 switches to using menu_set_location() instead, which has that effect. It also runs drupal_get_normal_path() on the specified path, so that you can enter path aliases.

This patch is against 1.2, not 1.x-dev, because I noticed other changes in the dev version that I feared might interfere with this patch. I'm not quite sure how to handle the none-case. That is left as an exercise for the committer. :-)

CommentFileSizeAuthor
set_location.patch1.2 KBCrell

Comments

anantagati’s picture

Sorry, I sent reply by mistake on bad issue.

MGN’s picture

Version: 5.x-1.2 » 5.x-1.x-dev
Status: Needs review » Fixed

I just committed something similar to this. See #124390: Highlight current menu item for details.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.