Showing the nested sub-navigation of the active primary link

23-Oct-2008
Filed under: Drupal, Drupal 5.x

This seems obvious, yet every time I start a new Drupal project I spend at least 10 minutes looking at older projects trying to find the solution.

I'm talking about getting Drupal to show the sub-navigation of a primary link when that primary link is active.

The solution is so simple it invariably leads to a facepalm: Instead of using the provided $primary_links variable in your template, enable the primary links block on the block configuration page.

Why can't I remember this?

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <i> <b> <cite> <code> <a>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
CAPTCHA
Are you human?