Last updated November 2, 2012. Created by NonProfit on April 22, 2010.
Edited by drupalshrek, aspilicious, admin7, Tor Arne Thune. Log in to edit this page.

Primary and Secondary links have been renamed to Main and Secondary menu. Themes which support these options will need to be updated to use the new variable names:

6.x: page.tpl.php

<div id="menu">
  <?php if (isset($secondary_links)) { ?><?php print theme('links', $secondary_links, array('class' => 'links', 'id' => 'subnavlist')); ?><?php } ?>
  <?php if (isset($primary_links)) { ?><?php print theme('links', $primary_links, array('class' => 'links', 'id' => 'navlist')) ?><?php } ?>
</div>

7.x: page.tpl.php

<?php if ($main_menu || $secondary_menu): ?>
  <div id="navigation"><div class="section">
      <?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('Main menu'))); ?>
      <?php print theme('links__system_secondary_menu', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('Secondary menu'))); ?>
  </div></div> <!-- /.section, /#navigation -->
<?php endif; ?>

You will also need to make the appropriate variable name changes if your theme's theme.info is defining features[]. Defining renamed or replaced features may cause all features to render as blank or empty arrays.

6.x: theme.info - features[]

features[] = primary_links
features[] = secondary_links

7.x: theme.info - features[]

features[] = main_menu
features[] = secondary_menu

Also, if your theme.info is defining features[] = mission please note that this feature has been removed and replaced with a variable named $mission which can be output in your page template.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

This doesn't work. Perhaps it's changed recently?
The example in /modules/system/page.tpl.php is:

<?php
print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'clearfix')), 'heading' => t('Main menu')));
?>

Scott Jackson
Wollongong NSW Australia

update.php does not change the menu names in the database, you will have to manually do it for your menus to appear (along with using the above).

You shouldn't have to do this if update.php ran correctly.