You are here

function menu_position_settings_form in Menu Position 7

Same name and namespace in other branches
  1. 7.2 menu_position.admin.inc \menu_position_settings_form()

Form definition: global settings for Menu position rules.

1 string reference to 'menu_position_settings_form'
menu_position_menu in ./menu_position.module
Implements hook_menu().

File

./menu_position.admin.inc, line 17
Provides infrequently used functions and hooks for menu_position.

Code

function menu_position_settings_form($form, &$form_state) {
  $form = array();
  $form['menu_position_active_link_display'] = array(
    '#type' => 'radios',
    '#title' => t('When a menu position rule matches:'),
    '#options' => array(
      'child' => t("Insert the current page's title into the menu tree."),
      'parent' => t('Mark the rule\'s parent menu item as being "active".'),
      'none' => t('Don\'t mark any menu item as being "active".'),
    ),
    '#default_value' => variable_get('menu_position_active_link_display', 'child'),
    '#description' => t("By default, a matching menu position rule will insert the current page's title into the menu tree just below the rule's parent menu item."),
  );
  $form['menu_position_rules_cache_enabled'] = array(
    '#title' => t('Use persistent cache for activated rules.'),
    '#description' => t("<strong>Experimental!</strong> Used to speed-up the rules evaluation process. Disabled by default."),
    '#type' => 'radios',
    '#default_value' => variable_get('menu_position_rules_cache_enabled', 0),
    '#options' => array(
      t('Disabled'),
      t('Enabled'),
    ),
  );
  return system_settings_form($form);
}