Posted by kramazeek on January 7, 2011 at 3:44am
Hi everyone,
Would anyone happen to know of anyway to tell what the menu name is while using theme_menu_tree? I need something like this to test against for theming purposes.
themename_menu_tree($tree){
If($menu_name == 'navigation'){
//do something different
}else{
//or return the standard output
return '
<?php
print $tree
?>';
}
}
The problem is by the time things get this far the menu has already been rendered for final output and you are working with just a string. Ultimately I need to alter a menu markup based on theme settings and the menu name. Anyone know if this is possible in the theme layer?
Thanks,
-Mike
Categories: menu name, menu tree, theme menus