function nice_menus_block_configure in Nice Menus 7.3
Same name and namespace in other branches
- 7.2 nice_menus.module \nice_menus_block_configure()
Implements hook_block_configure().
File
- ./
nice_menus.module, line 178 - Module to enable CSS dropdown and flyout menus.
Code
function nice_menus_block_configure($delta) {
$form['nice_menus_name_' . $delta] = array(
'#type' => 'textfield',
'#title' => t('Menu name'),
'#default_value' => variable_get('nice_menus_name_' . $delta, 'Nice menu ' . $delta),
);
$form['nice_menus_menu_' . $delta] = array(
'#type' => 'select',
'#title' => t('Menu parent'),
'#description' => t('The menu parent from which to show a Nice menu.'),
'#default_value' => variable_get('nice_menus_menu_' . $delta, 'navigation:0'),
'#options' => menu_parent_options(menu_get_menus(), 0),
);
$form['nice_menus_depth_' . $delta] = array(
'#type' => 'select',
'#title' => t('Menu depth'),
'#description' => t('The depth of the menu, i.e. the number of child levels starting with the parent selected above. Leave set to -1 to display all children and use 0 to display no children.'),
'#default_value' => variable_get('nice_menus_depth_' . $delta, -1),
'#options' => drupal_map_assoc(range(-1, 5)),
);
$form['nice_menus_type_' . $delta] = array(
'#type' => 'select',
'#title' => t('Menu style'),
'#description' => t('right: menu items are listed on top of each other and expand to the right') . '<br />' . t('left: menu items are listed on top of each other and expand to the left') . '<br />' . t('down: menu items are listed side by side and expand down'),
'#default_value' => variable_get('nice_menus_type_' . $delta, 'right'),
'#options' => drupal_map_assoc(array(
'right',
'left',
'down',
)),
);
$form['nice_menus_respect_expand_' . $delta] = array(
'#type' => 'select',
'#title' => t('Respect "Show as expanded" option'),
'#description' => t('Menu items have a "Show as expanded" option, which is disabled by default. Since menu items do NOT have this option checked by default, you should choose Yes here once you have configured the menu items that you DO want to expand.'),
'#options' => array(
0 => t('No'),
1 => t('Yes'),
),
'#default_value' => variable_get('nice_menus_respect_expand_' . $delta, 0),
);
return $form;
}