menu_configure

  1. drupal
    1. 4.7
    2. 5 menu.module
    3. 6 menu.admin.inc
    4. 7 menu.admin.inc
Versions
4.7 – 7 menu_configure()

Menu callback; presents menu configuration options.

Code

modules/menu.module, line 250

<?php
function menu_configure() {
  $menu = menu_get_menu();
  $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/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('Post 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 post authoring forms. The following option limits the menus in which a new link may be added. For 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 post authoring form. Only this menu item and its children will be shown.'),
  );

  return system_settings_form('menu_configure', $form);
}
?>