Secondary link and third level
girf - June 11, 2008 - 11:32
Hi,
I have installed Drupal 6 and I want secondary link to show the second level of primary links. It works fine.
But the problem is when I want to see the third level (the secondary link's second level), I can't see it.
As the primary link I'm using (in page.tpl.php)
<?php print theme ( 'links', $primary_links, array('id' => 'mainnav') ); ?>
and the secondary links
<?php print theme ( 'links', $secondary_links, array('class' => 'nav') ); ?>
The settings in menus are:
Source for the primary links: primary links
Source for the secondary links: primary links
Does anyone know what I should do?
Thank you,

Here's a start
This is a good write-up on this topic: http://www.freesoftwaremagazine.com/books/drupal_tricks/tertiary_menu
Basically, you can follow what the author says, except that the syntax in drupal 6.x is a little bit different. You have to tweak it just a bit to get it to work. Here is the syntax I used in my page.tpl.php:
<?php$third_level = menu_navigation_links(variable_get('menu_secondary_links_source', 'secondary-links'), 2);
print theme('links', $third_level, array('class' => 'tertiary-links'));
?>
I am just starting to work with this so I could totally be going about this the wrong way. It's a start, though.
Thank you, Local Menu (a
Thank you,
Local Menu (a module) worked pretty well. But I'll look at your suggestion also.
Thanks!
Local Menu is exactly what I was looking for. Thanks for pointing that out!
Nice reply
drp33 -
thanks for the informative reply, your code seems to work, haven't played with it much more than getting the tertiary links to display but it's a good start.
Displaying second level of primary menus
I just want to point out that by default in D6, the first level of the Secondary Links menu appears in the $secondary_links slot. This can be changed very easily in the menu settings tab (admin/build/menu/settings), selecting 'Primary links' as the 'Source for the secondary links: '. The terminology here is very confusing. I think that the Secondary Links menu should be called 'Supplemental links' or something similar to avoid confusion for themers.