3

I've created a sub of the zen-theme. And am mighty proud of it, but up in the top right corner (#secondary-menu) the user-menu shows up - perfectly.

I just don't understand how it get's there?

  • In structure/blocks the user-menu appears in the Disabled section (Region: None)
  • In fact, there IS no region called "secondary-menu" (id of the element gotten from Firebug)

Isn't that strange?

apaderno
  • 28,547
  • 16
  • 75
  • 90
T4NK3R
  • 4,245
  • 3
  • 23
  • 25

1 Answers1

6

I can't comment on your specific template files but the standard Zen page.tpl.php file has this in it:

<?php if ($secondary_menu): ?>
  <nav id="secondary-menu" role="navigation">
  <?php print theme('links__system_secondary_menu', array(
      'links' => $secondary_menu,
      'attributes' => array(
        'class' => array('links', 'inline', 'clearfix'),
      ),
      'heading' => array(
        'text' => $secondary_menu_heading,
        'level' => 'h2',
        'class' => array('element-invisible'),
      ),
    )); ?>
  </nav>
<?php endif; ?>

Which should answer how the menu gets printed to the page. If you want to dig one step deeper, the $secondary_menu variable is set up in template_preprocess_page().

As to why it's the user menu...if you go to admin/structure/menu/settings you should see this:

enter image description here

If you change the secondary link source to something else you should see that reflected in your theme too.

Clive
  • 36,918
  • 8
  • 87
  • 113
  • 1
    Aha, Menu settings! I think I understand it now: Main- and Secondary-menu are not "regions" at all. Thank you for a thorough answer, Clive. – T4NK3R Dec 10 '12 at 01:17