I've been trying to figure out how to customize a menu that is generated by the system. I currently have the menu set up as a block for the sake of simplicity, but I'd like to be able to incorporate it into the Drupal menu system.
I have set up a duplicate menu as the one I have in the block at the moment, and have been trying to configure the output of the HTML generated for the menu itself.
Rather than have the output be the default:
<li class="leaf"><a href="/page" title="Page Desc">Page title</a></li>
I'd like to have the href wrapped in a header tag, in this particular case, H2's would wrap the "a" tag. However, I DO NOT need or want this to apply to every generated menu, but only a single specific menu.
I can understand how to do this easily if I wanted to modify the theme_menu_item in my own template.php file, and apply the H2 wrapper to EVERY menu item in every menu, but I'd like to be able to reference this particular menu by ID or something similar to only theme this specific menu, and allow the normal functionality for other menus.
<?php
/**
* Generate the HTML output for a menu item and submenu.
*
* @ingroup themeable
*/
function theme_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) {
$class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf'));