use menu_set_location() instead of drupal_set_breadcrumb()

Crell - October 22, 2007 - 19:17
Project:Custom Breadcrumbs
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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. :-)

AttachmentSize
set_location.patch1.2 KB

#1

anantagati - November 29, 2007 - 09:46

Sorry, I sent reply by mistake on bad issue.

#2

MGN - September 19, 2009 - 06:23
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.

#3

System Message - October 3, 2009 - 06:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.