Tertiary links on Drupal

Update: check Tertiary links / 2: tree workaround before this. That’s a wiser solution in many cases.

Tested on:

  • Drupal 5.x
  • Zen subtheme

If you use primary and secondary links in distinct blocks/area of a page, you can add the ability to browse the third navigation level. Just hack your page.tpl.php.

<div id="secondary">
#display tertiary links menu on 2nd level
$tertiary_links=menu_primary_links(3, variable_get('menu_primary_menu', 0) );
#display secondary links menu on 1st level
print theme('links', $my_secondary_links, array('class' => 'links tertiary-links'));
elseif ($secondary_links): ?>
print theme('links', $secondary_links);
</div> <!-- /#secondary -->
<?php endif; ?>

See also:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: