I have a 3 level deep book navigation block. I'd like to change the menu tree HTML output in the following way: For each level of the tree, create a li and inside it put an anchor tag with the active-trail link for that level, and afterwards a ul with the rest of the siblings for that level.
<li>
<a href="#" class="active-trail level[x]">Level[x] active trail link</a>
<ul style="display:none;">
<li><a href="#">Level[x] sibling1</a></li>
<li><a href="#">Level[x] sibling2</a></li>
<li><a href="#">Level[x] sibling3</a></li>
<li><a href="#">Level[x] sibling4</a></li>
</ul>
</li>
The order of sibling links appearance should be according to their corresponding node weight.
I thought this could be done via the theme_menu_link() function but I can't seem to find a way to pass the current item's depth to the function.
What function do I have to work with in order to achieve what I'm after? Can someone offer some guidance?
Thanks, Avner