summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/menu/menu.admin.inc26
-rw-r--r--modules/menu/menu.install6
-rw-r--r--modules/menu/menu.module8
-rw-r--r--modules/system/page.tpl.php18
-rw-r--r--modules/system/system.admin.inc4
-rw-r--r--modules/system/system.install12
-rw-r--r--modules/system/system.module4
7 files changed, 45 insertions, 33 deletions
diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc
index 9d88dd7c7..c0aa7ed46 100644
--- a/modules/menu/menu.admin.inc
+++ b/modules/menu/menu.admin.inc
@@ -607,30 +607,30 @@ function menu_configure() {
$form['menu_default_node_menu'] = array(
'#type' => 'select',
'#title' => t('Default menu for content'),
- '#default_value' => variable_get('menu_default_node_menu', 'primary-links'),
+ '#default_value' => variable_get('menu_default_node_menu', 'main-menu'),
'#options' => $menu_options,
'#description' => t('Choose the menu to be the default in the menu options in the content authoring form.'),
);
- $primary = variable_get('menu_primary_links_source', 'primary-links');
- $primary_options = array_merge($menu_options, array('' => t('No primary links')));
- $form['menu_primary_links_source'] = array(
+ $main = variable_get('menu_main_menu_source', 'main-menu');
+ $main_options = array_merge($menu_options, array('' => t('No Main menu')));
+ $form['menu_main_menu_source'] = array(
'#type' => 'select',
- '#title' => t('Source for the primary links'),
- '#default_value' => $primary,
- '#options' => $primary_options,
+ '#title' => t('Source for the Main menu'),
+ '#default_value' => $main,
+ '#options' => $main_options,
'#tree' => FALSE,
- '#description' => t('Select what should be displayed as the primary links.'),
+ '#description' => t('Select what should be displayed as the Main menu.'),
);
- $secondary_options = array_merge($menu_options, array('' => t('No secondary links')));
- $form["menu_secondary_links_source"] = array(
+ $secondary_options = array_merge($menu_options, array('' => t('No Secondary menu')));
+ $form["menu_secondary_menu_source"] = array(
'#type' => 'select',
- '#title' => t('Source for the secondary links'),
- '#default_value' => variable_get('menu_secondary_links_source', 'secondary-links'),
+ '#title' => t('Source for the Secondary menu'),
+ '#default_value' => variable_get('menu_secondary_menu_source', 'secondary-menu'),
'#options' => $secondary_options,
'#tree' => FALSE,
- '#description' => t('Select what should be displayed as the secondary links. You can choose the same menu for secondary links as for primary links (currently %primary). If you do this, the children of the active primary menu link will be displayed as secondary links.', array('%primary' => $primary_options[$primary])),
+ '#description' => t("Select the source for the Secondary menu. An advanced option allows you to use the same source for both Main menu (currently %main) and Secondary menu: if your source menu has two levels of hierarchy, the top level menu items will appear in the Main menu, and the children of the active item will appear in the Secondary menu." , array('%main' => $main_options[$main])),
);
return system_settings_form($form);
diff --git a/modules/menu/menu.install b/modules/menu/menu.install
index 0097a3508..8ecebac83 100644
--- a/modules/menu/menu.install
+++ b/modules/menu/menu.install
@@ -10,8 +10,8 @@ function menu_install() {
$t = get_t();
db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'navigation', $t('Navigation'), $t('The navigation menu is provided by Drupal and is the main interactive menu for any site. It is usually the only menu that contains personalized links for authenticated users, and is often not even visible to anonymous users.'));
- db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'primary-links', $t('Primary links'), $t('Primary links are often used at the theme layer to show the major sections of a site. A typical representation for primary links would be tabs along the top.'));
- db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'secondary-links', $t('Secondary links'), $t('Secondary links are often used for pages like legal notices, contact details, and other secondary navigation items that play a lesser role than primary links.'));
+ db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'main-menu', $t('Main menu'), $t('The Main menu is often used by themes to show the major sections of a site. A typical representation of the Main menu would be tabs along the top.'));
+ db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'secondary-menu', $t('Secondary menu'), $t('The Secondary menu is often used for pages like legal notices, contact details, and other navigation items that play a lesser role than the Main menu.'));
}
/**
@@ -28,7 +28,7 @@ function menu_uninstall() {
*/
function menu_schema() {
$schema['menu_custom'] = array(
- 'description' => t('Holds definitions for top-level custom menus (for example, Primary Links).'),
+ 'description' => t('Holds definitions for top-level custom menus (for example, Main menu).'),
'fields' => array(
'menu_name' => array(
'type' => 'varchar',
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index 0731f5fda..0bd30ba07 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -18,7 +18,7 @@ define('MENU_MAX_MENU_NAME_LENGTH_UI', 27);
function menu_help($path, $arg) {
switch ($path) {
case 'admin/help#menu':
- $output = '<p>' . t("The menu module provides an interface to control and customize Drupal's powerful menu system. Menus are a hierarchical collection of links, or menu items, used to navigate a website, and are positioned and displayed using Drupal's flexible block system. By default, three menus are created during installation: <em>Navigation</em>, <em>Primary links</em>, and <em>Secondary links</em>. The <em>Navigation</em> menu contains most links necessary for working with and navigating your site, and is often displayed in either the left or right sidebar. Most Drupal themes also provide support for <em>Primary links</em> and <em>Secondary links</em>, by displaying them in either the header or footer of each page. By default, <em>Primary links</em> and <em>Secondary links</em> contain no menu items but may be configured to contain custom menu items specific to your site.") . '</p>';
+ $output = '<p>' . t("The menu module provides an interface to control and customize Drupal's powerful menu system. Menus are a hierarchical collection of links, or menu items, used to navigate a website, and are positioned and displayed using Drupal's flexible block system. By default, three menus are created during installation: <em>Navigation</em>, <em>Main menu</em>, and <em>Secondary menu</em>. The <em>Navigation</em> menu contains most links necessary for working with and navigating your site, and is often displayed in either the left or right sidebar. Most Drupal themes also provide support for the <em>Main menu</em> and <em>Secondary menu</em>, by displaying them in either the header or footer of each page. By default, the <em>Main menu</em> and <em>Secondary menu</em> contain no menu items but may be configured to contain custom menu items specific to your site.") . '</p>';
$output .= '<p>' . t('The <a href="@menu">menus page</a> displays all menus currently available on your site. Select a menu from this list to add or edit a menu item, or to rearrange items within the menu. Create new menus using the <a href="@add-menu">add menu page</a> (the block containing a new menu must also be enabled on the <a href="@blocks">blocks administration page</a>).', array('@menu' => url('admin/build/menu'), '@add-menu' => url('admin/build/menu/add'), '@blocks' => url('admin/build/block'))) . '</p>';
$output .= '<p>' . t('For more information, see the online handbook entry for <a href="@menu">Menu module</a>.', array('@menu' => 'http://drupal.org/handbook/modules/menu/')) . '</p>';
return $output;
@@ -48,7 +48,7 @@ function menu_perm() {
function menu_menu() {
$items['admin/build/menu'] = array(
'title' => 'Menus',
- 'description' => "Control your site's navigation menu, primary links and secondary links. as well as rename and reorganize menu items.",
+ 'description' => "Control your site's Navigation menu, Main menu and Secondary menu. as well as rename and reorganize menu items.",
'page callback' => 'menu_overview_page',
'access callback' => 'user_access',
'access arguments' => array('administer menu'),
@@ -310,7 +310,7 @@ function menu_nodeapi(&$node, $op) {
case 'prepare':
if (empty($node->menu)) {
// Prepare the node for the edit form so that $node->menu always exists.
- $menu_name = variable_get('menu_default_node_menu', 'primary-links');
+ $menu_name = variable_get('menu_default_node_menu', 'main-menu');
$item = array();
if (isset($node->nid)) {
// Give priority to the default menu
@@ -387,7 +387,7 @@ function menu_form_alter(&$form, $form_state, $form_id) {
$options = menu_parent_options(menu_get_menus(), $item);
$default = $item['menu_name'] . ':' . $item['plid'];
if (!isset($options[$default])) {
- $default = 'primary-links:0';
+ $default = 'main-menu:0';
}
$form['menu']['parent'] = array(
'#type' => 'select',
diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php
index 95a53db44..cbbf01f72 100644
--- a/modules/system/page.tpl.php
+++ b/modules/system/page.tpl.php
@@ -45,9 +45,9 @@
*
* Navigation:
* - $search_box: HTML to display the search box, empty if search has been disabled.
- * - $primary_links (array): An array containing primary navigation links for the
+ * - $main_menu (array): An array containing the Main menu links for the
* site, if they have been configured.
- * - $secondary_links (array): An array containing secondary navigation links for
+ * - $secondary_menu (array): An array containing the Secondary menu links for
* the site, if they have been configured.
*
* Page content (in order of occurrance in the default page.tpl.php):
@@ -124,16 +124,16 @@
<div id="container" class="clear-block">
- <div id="navigation" class="menu <?php if (!empty($primary_links)) { print "withprimary"; } if (!empty($secondary_links)) { print " withsecondary"; } ?> ">
- <?php if (!empty($primary_links)): ?>
- <div id="primary" class="clear-block">
- <?php print theme('links', $primary_links, array('class' => 'links primary-links')); ?>
+ <div id="navigation" class="menu <?php if (!empty($main_menu)) { print "withmain"; } if (!empty($secondary_menu)) { print " withsecondary"; } ?> ">
+ <?php if (!empty($main_menu)): ?>
+ <div id="main-menu" class="clear-block">
+ <?php print theme('links', $main_menu, array('class' => 'links main-menu')); ?>
</div>
<?php endif; ?>
- <?php if (!empty($secondary_links)): ?>
- <div id="secondary" class="clear-block">
- <?php print theme('links', $secondary_links, array('class' => 'links secondary-links')); ?>
+ <?php if (!empty($secondary_menu)): ?>
+ <div id="secondary-menu" class="clear-block">
+ <?php print theme('links', $secondary_menu, array('class' => 'links secondary-menu')); ?>
</div>
<?php endif; ?>
</div> <!-- /navigation -->
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 87ef36dd9..0c8a50a7b 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -370,8 +370,8 @@ function system_theme_settings(&$form_state, $key = '') {
'comment_user_picture' => t('User pictures in comments'),
'search' => t('Search box'),
'favicon' => t('Shortcut icon'),
- 'primary_links' => t('Primary links'),
- 'secondary_links' => t('Secondary links'),
+ 'main_menu' => t('Main menu'),
+ 'secondary_menu' => t('Secondary menu'),
);
// Some features are not always available
diff --git a/modules/system/system.install b/modules/system/system.install
index 7e2d240b7..044f52ef4 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -3018,6 +3018,18 @@ function system_update_7008() {
}
/**
+ * Rename the variables for primary and secondary links.
+ *
+ */
+function system_update_7009() {
+ $ret = array();
+ $ret[] = update_sql("UPDATE {variable} SET name = 'menu_main_menu_source' WHERE name = 'menu_primary_links_source'");
+ $ret[] = update_sql("UPDATE {variable} SET name = 'menu_main_menu_source' WHERE name = 'menu_primary_links_source'");
+
+ return $ret;
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/
diff --git a/modules/system/system.module b/modules/system/system.module
index 0293f65bd..4fa9992e5 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -928,8 +928,8 @@ function system_theme_default() {
'node_user_picture',
'search',
'slogan',
- 'primary_links',
- 'secondary_links',
+ 'main_menu',
+ 'secondary_menu',
),
'stylesheets' => array(
'all' => array('style.css')