You are here

function footermap_settings in footermap: a footer site map 5.2

Same name and namespace in other branches
  1. 5 footermap.module \footermap_settings()
  2. 6 footermap.module \footermap_settings()
  3. 7 footermap.module \footermap_settings()

Setup settings form for footermap

Return value

array an array of forms

1 string reference to 'footermap_settings'
footermap_menu in ./footermap.module
Set settings path

File

./footermap.module, line 58
This module queries the menu for pages and makes a dynamic sitemap at the bottom of the page.

Code

function footermap_settings() {
  $form['recurse_limit'] = array(
    '#type' => 'textfield',
    '#title' => t('Recurse Limit'),
    '#default_value' => variable_get('recurse_limit', 0),
    '#size' => 3,
    '#maxlength' => 3,
    '#description' => t('Set the # of times to recurse through a particular menu.  Default is 0, unlimited.'),
  );
  $topmenu = variable_get('top_menu', variable_get('menu_primary_menu', 0));
  $form['top_menu'] = array(
    '#type' => 'textfield',
    '#title' => t('Top Menu'),
    '#default_value' => $topmenu,
    '#size' => 3,
    '#maxlength' => 3,
    '#description' => t('Set the menu id to use as the top level.  Default is to start at 0 i.e. primary links which should be set by the menu_primary_menu variable. If you are seeing odd behavior try setting this to 0.'),
  );
  $primary_menus = footermap_get_primary_menus($topmenu);
  $form['avail_menus'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Enabled Menus'),
    '#default_value' => variable_get('avail_menus', array(
      'Primary links',
    )),
    '#options' => $primary_menus,
    '#description' => t('Select the menus you want visible.'),
  );
  $form['menu_headers'] = array(
    '#type' => 'radios',
    '#title' => t('Menu Headers'),
    '#default_value' => variable_get('menu_headers', 0),
    '#options' => array(
      t('No'),
      t('Yes'),
    ),
    '#required' => '1',
    '#description' => t('Display menu block headers in the footer site map.'),
  );
  $form['footer_legacy'] = array(
    '#type' => 'radios',
    '#title' => t('Enable Legacy Footermap'),
    '#default_value' => variable_get('footer_legacy', 0),
    '#options' => array(
      t('No'),
      t('Yes'),
    ),
    '#description' => t('Enable footeramp to be inserted in the closure as well as in a block. You probably do not want to enable this unless you\'re upgrading from an older version.'),
  );
  $form['footer_cache'] = array(
    '#type' => 'radios',
    '#title' => t('Enable Caching'),
    '#default_value' => variable_get('footer_cache', 0),
    '#options' => array(
      t('Yes'),
      t('No'),
    ),
    '#required' => '1',
    '#description' => t('Enable caching of footermap. Recommended.'),
  );
  return system_settings_form($form);
}