By Lioz on
I'm developing a drop down menu for my theme.
What i want to do is to take control of my primary links structure
basically i want a structure like this
<ul>
<li><a href="#" >First Level</a>
<div>
<dl>
<dt><a href="# >Second level </a></dt>
<dd><a href="#">Third level</a></dd>
<dd><a href="#">Third level</a></dd>
</dl>
<dl>
<dt><a href="# >Second level </a></dt>
<dd><a href="#">Third level</a></dd>
<dd><a href="#">Third level</a></dd>
</dl>
</div>
</li>
and so on.....
</ul>
I managed to get primary links full-tree by adding this function to my template.php
function phptemplate_get_primary_links() {
return menu_tree(variable_get('menu_primary_links_source', 'primary-links'));
}
but I cannot figure out how to handle menu_tree output to match my structure.
Is it possible?
thanks in advance for your help :)
Comments
in Drupal 5, you'd provide
in Drupal 5, you'd provide your own implementation of the theme_menu_links function. in Drupal 6, i believe you'll just need to create a file called menu-tree.tpl.php... see the 5.x to 6.x theme upgrade handbook page to get started.
right
i managed to achieve this in drupal5 but non in d6
the problem is that menu_links renders only the first level of the menu
what i need would be something like this to get different menu levels
don't know if it's possible thoungh
http://www.signalkuppe.com