I'm trying to get a menu with my custom classes.
I would like to be able to
<ul class="my-menu">// class of the whole ul <li class="with-sub">// add class "with-sub" if has children <a href="#">submenu</a> <ul class="sub-menu"> // add class sub-menu to sub menu ul <li class="title-of-the-parent">// add the title of the parent as first item of the list <a href="#">TITLE OF THE PARENT</a> </li> <li class="my-submenu-item">// add a class to all sub-menu items <a href="#"> Submenu item</a> </li> </ul> </li> </ul>
For the first level it's fine. I can use menu_tree and menu_link to get what I want.
I would like to know how to use $sub_menu = drupal_render($element['#below']) and customize the sub menu list.
I don't want to use any module, I want to do all through the template.php.
Thanks in advance