Primary and Secondary links renamed to Main and Secondary menu

Last updated on
31 August 2016

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 } ?>

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 is defining features[]. Defining renamed or replaced features may cause all features to render as blank or empty arrays.

6.x: - features[]

features[] = primary_links
features[] = secondary_links

7.x: - features[]

features[] = main_menu
features[] = secondary_menu

Also, if your 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.