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 |
Jump to:
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. :-)
| Attachment | Size |
|---|---|
| set_location.patch | 1.2 KB |

#1
Sorry, I sent reply by mistake on bad issue.
#2
I just committed something similar to this. See #124390: Highlight current menu item for details.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.