views:

23

answers:

3

I'm trying to get my secondary links (which are using primary links as the source, so the children of the primary links) to display as a dropdown on every page. However, since (im guessing) there is no active trail on the front page, the secondary links aren't displayed.

How do I set them so that I can display the secondary links on the front page?

A: 

You can use the "theme" function to display the secondary links into your front page:

 print theme('links', $secondary_links, array('class' => 'links secondary-links'));

And to create the dropdown you can overwrite the "theme_links" function into your template.php file: http://api.drupal.org/api/function/theme_links

Hope it helps.

FR6
A: 

The Menu block module will do what you're describing and a whole lot more.

Matt V.
A: 

If you want to display secondary links only on frontpage, don't forget to add an if statement such as:

if ($is_front) {
    print theme('links',$secondary_links,array('class' => 'class-for-secondary-links'));
}

Or just use custom template for frontpage.

Olexandr Skrypnyk

related questions