| 1 |
<?php |
<?php |
| 2 |
// $Id: menutree.admin.inc,v 1.1 2008/01/22 02:56:59 crell Exp $ |
// $Id: menutree.admin.inc,v 1.1.2.1 2008/08/19 22:19:21 crell Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 23 |
|
|
| 24 |
$menus = menu_get_menus(); |
$menus = menu_get_menus(); |
| 25 |
foreach ($menus as $menu_name => $menu_title) { |
foreach ($menus as $menu_name => $menu_title) { |
| 26 |
$open = trim(variable_get('menutree_title_'. $menu_name, '') |
$open = trim(variable_get('menutree_title_'. $menu_name, '') |
| 27 |
. variable_get('menutree_intro_text_'. $menu_name, '') |
. variable_get('menutree_intro_text_'. $menu_name, '') |
| 28 |
. str_replace('<none>', '', variable_get('menutree_all_weight_'. $menu_name, '<none>'))); |
. str_replace('<none>', '', variable_get('menutree_all_weight_'. $menu_name, '<none>'))); |
| 29 |
|
|
| 33 |
'#collapsible' => TRUE, |
'#collapsible' => TRUE, |
| 34 |
'#collapsed' => ($open ? FALSE : TRUE), |
'#collapsed' => ($open ? FALSE : TRUE), |
| 35 |
'#description' => t('The path <a href="@link">@path</a> will provide a complete tree of all menu items in this menu. If you wish to set a custom title or header text, do so here.', array( |
'#description' => t('The path <a href="@link">@path</a> will provide a complete tree of all menu items in this menu. If you wish to set a custom title or header text, do so here.', array( |
| 36 |
'@link' => url('menutree/'. $menu_name), |
'@link' => url('menutree/'. $menu_name), |
| 37 |
'@path' => 'menutree/'. $menu_name, |
'@path' => 'menutree/'. $menu_name, |
| 38 |
)), |
)), |
| 39 |
); |
); |
| 56 |
'#options' => $weights, |
'#options' => $weights, |
| 57 |
'#default_value' => variable_get('menutree_all_weight_'. $menu_name, '<none>'), |
'#default_value' => variable_get('menutree_all_weight_'. $menu_name, '<none>'), |
| 58 |
'#description' => t('The path <a href="@link">@path</a> will provide multiple menu trees on a single page. You can specify which and in what order here. Set the weight to "<none>" to exclude this menu.', array( |
'#description' => t('The path <a href="@link">@path</a> will provide multiple menu trees on a single page. You can specify which and in what order here. Set the weight to "<none>" to exclude this menu.', array( |
| 59 |
'@link' => url('menutree/all'), |
'@link' => url('menutree/all'), |
| 60 |
'@path' => 'menutree/all', |
'@path' => 'menutree/all', |
| 61 |
)), |
)), |
| 62 |
); |
); |
|
|
|
| 63 |
} |
} |
| 64 |
|
|
| 65 |
return system_settings_form($form); |
return system_settings_form($form); |