Make a class for submenu in a node
msn - November 8, 2009 - 21:00
| Project: | Submenu Tree |
| Version: | 6.x-1.4 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
After enabling submenu tree for a node I need a CSS class for changing the look of the submenu.
In submenutree.module I changed 2 lines (498,499)
function theme_submenu_tree_menu($tree, $title = null) {
$output = '';
if (isset($title))
$output .= '<h3>'. $title .'</h3>';
$output .= menu_tree_output($tree);
return $output;
}in
function theme_submenu_tree_menu($tree, $title = null) {
$output = '';
if (isset($title))
$output .= '<div class="submenu-tree">'.'<h3>'. $title .'</h3>';
$output .= menu_tree_output($tree).'</div>';
return $output;
}I am not a professional-coder, so I don't know how to make a patch for this. I also don't know if other parts of the script needs changes.
I don't like changes in original module script and I think this could be usefull for others.
regards
Martin

#1
You can override the output of submenutree by using your theme. See http://drupal.org/node/341628.
Essentially, you create your own version of theme('submenu_tree_menu', ...) and change that to do as you like.
#2
Thanks for pointing me to a better way of overriding the output. I made my changes in template.php.
Martin
#3
Automatically closed -- issue fixed for 2 weeks with no activity.