I'm using Zen, duplicated the "Starterkit" folder and creating my own subtheme.

Is it true? I added some links in Primary and Secondary Links under Menu, but I didn't activate them in the "Blocks"... If I do, they will be duplicated in the Nav bar! Is this normal? Why is this happening?

Here's the code:

      <?php if ($search_box || $primary_links || $secondary_links || $navbar): ?>
        <div id="navbar"><div id="navbar-inner">

          <a name="navigation" id="navigation"></a>

          <?php if ($search_box): ?>
            <div id="search-box">
              <?php print $search_box; ?>
            </div> <!-- /#search-box -->
          <?php endif; ?>

          <?php if ($primary_links): ?>
            <div id="primary">
              <?php print theme('links', $primary_links); ?>
            </div> <!-- /#primary -->
          <?php endif; ?>

          <?php if ($secondary_links): ?>
            <div id="secondary">
              <?php print theme('links', $secondary_links); ?>
            </div> <!-- /#secondary -->
          <?php endif; ?>

          <?php print $navbar; ?>

        </div></div> <!-- /#navbar-inner, /#navbar -->
      <?php endif; ?>

and here's my site: http://www.iswack.com/drupal-60/

Right now, I haven't put anything in the Navigation Bar under "Blocks". If I put Primary Links in Nav Bar, then the "Forum" link and "configure edit menu" links will pop up under the "Forum Create Content" links. This seems strange to me... I thought u were supposed to put primary links in your nav bar as the main navigation... then put secondary links may be a the bottom of the page for the misc stuff like legal note or sitemap...

Thanks.

Comments

sunshinee’s picture

First, I like your design. :)

This portion of code calls the primary (and secondary) links into the page regardless of your block settings. Try removing this from page.tpl.php and then activate the primary links in the desired block.

      <?php if ($primary_links): ?>
            <div id="primary">
              <?php print theme('links', $primary_links); ?>
            </div> <!-- /#primary -->
          <?php endif; ?>

          <?php if ($secondary_links): ?>
            <div id="secondary">
              <?php print theme('links', $secondary_links); ?>
            </div> <!-- /#secondary -->
          <?php endif; ?>

If you want to keep your primary-secondary link structure, you can separate/relocate the code in your page.tpl.php.

Hope this helps. :)

sepeck’s picture

Primary and secondary menu's are special and the result of the Drupal evolved. Originally they were not part of the menu system but a separate independent feature. Over time, as the menu module improved, it made sense to migrate them into the menu module. All menu's generate a block. Primary and secondary menu's are special case so can be viewed via the theme functions or a standard menu block. They have functions that set up special handling for themes to leverage if they want to.

You do not have to use them. You are free to disable them via the theme admin interface if you want and use the standard blocks.

BTW, devel module will auto generate dummy content.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

Jennifer_M’s picture

Thanks rjoy and sepeck for the clarification.

I just found this page & this answer after probably about 20 to 30 minutes of searching on various phrases and reading pages which proved to be unrelated.

My 2p for future designers of the Starterkit:

I don't think the behaviour as described is desirable, since it's unguessable from the otherwise (i.m.o.) clear structure offered on the admin/build/block page, which I was able to understand just by poking about.

If I wanted the primary links to appear in the nav bar I could put them in via the admin page, couldn't I? and surely that's preferable in terms of reducing the amount of PHP-poking as compared to ticky-boxing.

Maybe there's some other good reason for the default which as a newbie I'm not in a position to understand, but even if so, there's a cost in time spent trying to figure out what's going on. Couldn't the default be to remove or at least comment out those bits of PHP quoted by rjoy? Then the people who want whatever benefit the extra links give can still get it by editing page.tpl.php, but the default is to rely on the menu system's natural cleverness.

Would be interested to know the rationale for the current design if there's some advantage that I don't understand.

Hope that doesn't sound too grumpy.

jaks’s picture

Menus > settings

primary links source = no primary links

tomoyuch’s picture

I just started to learn drupal, and spent two hours for this.
thank you!!

Remy Marathe’s picture

Echoing tomoyuch with the thanks. The solution wasn't remotely obvious to this newbie, even looking directly at it I wouldn't have expected this menu item to disable only the primary links in their fixed location, and not where I placed them under block settings.