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.
To see this, add this to garland's template.php and add the user-menu block to a region:
function garland_menu_tree__user_menu(&$vars) {
dpr('user menu'); // this does not print!
return theme_menu_tree($vars);
}
function garland_menu_tree__management(&$vars) {
dpr('management menu'); // this does print!
return theme_menu_tree($vars);
}
Comment | File | Size | Author |
---|---|---|---|
#3 | 890884-3.drupal.menu-overrides-hyphen.patch | 679 bytes | joachim |
#1 | 890884.drupal.menu-overrides-hyphen.patch | 684 bytes | joachim |
Comments
Comment #1
joachim CreditAttribution: joachim commentedNice and simple patch.
Though is there an API function for converting - to _ for theme functions?
Comment #2
sunWe should use strtr() here, as that is much faster on short strings + small replacements.
Powered by Dreditor.
Comment #3
joachim CreditAttribution: joachim commentedThanks for the review! :)
Here's another patch using that instead.
Comment #4
sunThanks!
Comment #5
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #7
markabur CreditAttribution: markabur commentedPlease see followup issue with theme_menu_link(): #1001146: Cannot theme links in a menu when menu_name contains a hyphen.