I have a menu that should look like this:
<ul class="subpagemenu">
<li><a href="xx">xx</a>
<ul>
<li><a href="xx">xx</a></li>
</ul>
</li>
<li><a href="xx">xx</a></li>
</ul>
You can see, that the first ul has a class and the submenu ul doesn't have.
I am using this code to add class to the ul.
function mytheme_menu_tree__menu_mymenu($variables) {
return '<ul class="subpagemenu">' . $variables['tree'] . '</ul>';
}
But it adds that class to the all submenus.
<ul class="subpagemenu">
<li><a href="xx">xx</a>
<ul class="subpagemenu">
<li><a href="xx">xx</a></li>
</ul>
</li>
<li><a href="xx">xx</a></li>
</ul>
Is there any way to theme the sub menu? Thank you.
ul ul