function menu_configure in Drupal 5
Same name and namespace in other branches
- 4 modules/menu.module \menu_configure()
- 6 modules/menu/menu.admin.inc \menu_configure()
- 7 modules/menu/menu.admin.inc \menu_configure()
Menu callback; presents menu configuration options.
1 string reference to 'menu_configure'
- menu_menu in modules/
menu/ menu.module - Implementation of hook_menu().
File
- modules/
menu/ menu.module, line 249 - Allows administrators to customize the site navigation menu.
Code
function menu_configure() {
$root_menus = menu_get_root_menus();
$primary_options = $root_menus;
$primary_options[0] = t('No primary links');
$form['settings_links'] = array(
'#type' => 'fieldset',
'#title' => t('Primary and secondary links settings'),
);
$form['settings_links']['intro'] = array(
'#type' => 'item',
'#value' => t('Primary and secondary links provide a navigational menu system which usually (depending on your theme) appears at the top-right of the browser window. The links displayed can be generated either from a custom list created via the <a href="@menu">menu administration</a> page or from a built-in list of menu items such as the navigation menu links.', array(
'@menu' => url('admin/build/menu'),
)),
);
$form['settings_links']['menu_primary_menu'] = array(
'#type' => 'select',
'#title' => t('Menu containing primary links'),
'#default_value' => variable_get('menu_primary_menu', 0),
'#options' => $primary_options,
);
$secondary_options = $root_menus;
$secondary_options[0] = t('No secondary links');
$form['settings_links']['menu_secondary_menu'] = array(
'#type' => 'select',
'#title' => t('Menu containing secondary links'),
'#default_value' => variable_get('menu_secondary_menu', 0),
'#options' => $secondary_options,
'#description' => t('If you select the same menu as primary links then secondary links will display the appropriate second level of your navigation hierarchy.'),
);
$form['settings_authoring'] = array(
'#type' => 'fieldset',
'#title' => t('Content authoring form settings'),
);
$form['settings_authoring']['intro'] = array(
'#type' => 'item',
'#value' => t('The menu module allows on-the-fly creation of menu links in the content authoring forms. The following option limits the menus in which a new link may be added. E.g., this can be used to force new menu items to be created in the primary links menu or to hide admin menu items.'),
);
$authoring_options = $root_menus;
$authoring_options[0] = t('Show all menus');
$form['settings_authoring']['menu_parent_items'] = array(
'#type' => 'select',
'#title' => t('Restrict parent items to'),
'#default_value' => variable_get('menu_parent_items', 0),
'#options' => $authoring_options,
'#description' => t('Choose the menu to be made available in the content authoring form. Only this menu item and its children will be shown.'),
);
return system_settings_form($form);
}