You are here

function footermap_settings in footermap: a footer site map 7

Same name and namespace in other branches
  1. 5.2 footermap.module \footermap_settings()
  2. 5 footermap.module \footermap_settings()
  3. 6 footermap.module \footermap_settings()
1 string reference to 'footermap_settings'
footermap_menu in ./footermap.module

File

./footermap.module, line 73

Code

function footermap_settings() {
  $form = array();
  $form['recurse_limit'] = array(
    '#type' => 'textfield',
    '#title' => t('Recurse Limit'),
    '#description' => t('Limit the footermap recursion function to <em>N</em> recursions. The default is 0, unlimited. This is useful if you have a deep hierarchy of child menu items that you do not want to display in the footermap.'),
    '#size' => 3,
    '#max_length' => 3,
    '#default_value' => variable_get('recurse_limit', 0),
  );
  $form['footermap_heading'] = array(
    '#type' => 'radios',
    '#title' => t('Enable Menu Heading'),
    '#description' => t('This will enable the menu-name property (e.g. navigation, user-menu) to be displayed as the heading above each menu column. This is nice if you have your menus setup in distinct blocks or controlled via the recurse-limit property above.'),
    '#options' => array(
      t('No'),
      t('Yes'),
    ),
    '#default_value' => variable_get('footermap_heading', 0),
  );
  $form['top_menu'] = array(
    '#type' => 'textfield',
    '#title' => t('Drupal Root Menu'),
    '#description' => t('Set the menu id to use as the top level.  Default is to start at 0 i    .e. primary menus - primary, secondary, and navigation menus'),
    '#default_value' => variable_get('top_menu', 0),
    '#max_length' => 3,
    '#size' => 3,
  );
  $avail_menus = footermap_get_primary_menus(variable_get('top_menu', 0));
  $form['avail_menus'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Available menus'),
    '#description' => t('Limit the available menus under the "top menu" setting above to the following menu items and their children.'),
    '#options' => $avail_menus,
    '#default_value' => variable_get('avail_menus', array()),
  );
  $form['sys_menus'] = array(
    '#type' => 'radios',
    '#title' => t('Enable System Menu Items'),
    '#description' => t('Enable system menus to be displayed. This is disabled by default, bu    t is known to not work with Views menus because of a bug in <a href="http://api.drupal.org/api/function/hook_menu_link_alter/7">hook_menu_link_alter</a>'),
    '#options' => array(
      t('No'),
      t('Yes'),
    ),
    '#default_value' => variable_get('sys_menus', 0),
  );
  return system_settings_form($form, FALSE);
}