You are here

function menu_configure in Drupal 6

Same name and namespace in other branches
  1. 4 modules/menu.module \menu_configure()
  2. 5 modules/menu/menu.module \menu_configure()
  3. 7 modules/menu/menu.admin.inc \menu_configure()

Menu callback; Build the form presenting menu configuration options.

1 string reference to 'menu_configure'
menu_menu in modules/menu/menu.module
Implementation of hook_menu().

File

modules/menu/menu.admin.inc, line 605
Administrative page callbacks for menu module.

Code

function menu_configure() {
  $form['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 sets the default menu in which a new link will be added.'),
  );
  $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', 'primary-links'),
    '#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(
    '#type' => 'select',
    '#title' => t('Source for the primary links'),
    '#default_value' => $primary,
    '#options' => $primary_options,
    '#tree' => FALSE,
    '#description' => t('Select what should be displayed as the primary links.'),
  );
  $secondary_options = array_merge($menu_options, array(
    '' => t('No secondary links'),
  ));
  $form["menu_secondary_links_source"] = array(
    '#type' => 'select',
    '#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. 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],
    )),
  );
  return system_settings_form($form);
}