From 6eaaa3c1b3779aa4a965232c97eb167f749ed09b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Mon, 20 Aug 2007 18:26:41 +0000 Subject: #160168 by kkaefer and pwolanin: restore lost Drupal 5 functionality of being able to set primary and secondary links differently --- modules/menu/menu.module | 14 ++++++++++++-- modules/system/system.module | 8 ++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/menu/menu.module b/modules/menu/menu.module index 8a5f59e10..999e16761 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -856,14 +856,24 @@ function menu_configure() { '#value' => t('The menu module allows on-the-fly creation of menu links in the content authoring forms. The following option sets the default menu in which a new link will be added.'), ); - $authoring_options = menu_get_menus(); + $menu_options = menu_get_menus(); $form['menu_default_node_menu'] = array('#type' => 'select', '#title' => t('Default menu for content'), '#default_value' => variable_get('menu_default_node_menu', 'navigation'), - '#options' => $authoring_options, + '#options' => $menu_options, '#description' => t('Choose the menu to be the default in the menu options in the content authoring form.'), ); + $secondary_options = array('secondary-links' => $menu_options['secondary-links'], 'primary-links' => $menu_options['primary-links']); + $form["menu_secondary_links_source"] = array( + '#type' => 'radios', + '#title' => t('Source for the secondary links'), + '#default_value' => variable_get('menu_secondary_links_source', 'secondary-links'), + '#options' => $secondary_options, + '#tree' => FALSE, + '#description' => t('Select what should be displayed as the secondary links . If %primary is choosen the children of the active primary menu link (if any) will be shown instead of the links in the %secondary menu.', array('%secondary' => $menu_options['secondary-links'], '%primary' => $menu_options['primary-links'])), + ); + return system_settings_form($form); } diff --git a/modules/system/system.module b/modules/system/system.module index e0152b5f1..460780709 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1069,7 +1069,9 @@ function system_theme_default() { 'name', 'node_user_picture', 'search', - 'slogan' + 'slogan', + 'primary_links', + 'secondary_links', ), 'stylesheets' => array( 'all' => array('style.css') @@ -2365,7 +2367,9 @@ function system_theme_settings(&$form_state, $key = '') { 'node_user_picture' => t('User pictures in posts'), 'comment_user_picture' => t('User pictures in comments'), 'search' => t('Search box'), - 'favicon' => t('Shortcut icon') + 'favicon' => t('Shortcut icon'), + 'primary_links' => t('Primary links'), + 'secondary_links' => t('Secondary links'), ); // Some features are not always available -- cgit v1.2.3