function footermap_settings in footermap: a footer site map 6
Same name and namespace in other branches
- 5.2 footermap.module \footermap_settings()
- 5 footermap.module \footermap_settings()
- 7 footermap.module \footermap_settings()
1 string reference to 'footermap_settings'
File
- ./
footermap.module, line 50
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', variable_get('menu_primary_menu', 0)),
'#max_length' => 3,
'#size' => 3,
);
$avail_menus = footermap_get_primary_menus(variable_get('top_menu', variable_get('menu_primary_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),
);
$form['footer_legacy'] = array(
'#type' => 'radios',
'#title' => t('Enable Legacy Footermap'),
'#description' => t('Enable footermap to be inserted in the $closure as well as in a block. You pr obably do not want to enable this unless you\'re upgrading from an older version.'),
'#options' => array(
t('No'),
t('Yes'),
),
'#default_value' => variable_get('footer_legacy', 0),
);
$form['footer_cache'] = array(
'#type' => 'radios',
'#title' => t('Enable Footermap Cache'),
'#description' => t('Enable caching of footermap. This is only recommended if you are using the legacy footeramp. This option will be removed in the future when the legacy footeramp is deprecated. Caching is done via the block system.'),
'#options' => array(
t('No'),
t('Yes'),
),
'#default_value' => variable_get('footer_cache', 0),
);
return system_settings_form($form);
}