drupaldrupal-blocksdrupal-zendrupal-regions

user-menu in secondary-menu: why?


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?

Isn't that strange?


Solution

  • 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.