| 1 |
<?php |
<?php |
| 2 |
// $Id: automenu.module,v 1.1.4.2 2009/05/05 12:29:33 farbridges Exp $ |
// $Id: automenu.module,v 1.1.4.3 2009/05/05 13:14:03 farbridges Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_nodeapi(). |
* Implementation of hook_nodeapi(). |
| 49 |
// add a selection for "no language" selection... maybe we can find a |
// add a selection for "no language" selection... maybe we can find a |
| 50 |
// better way (I think this is what happens in language neutral situations?) |
// better way (I think this is what happens in language neutral situations?) |
| 51 |
|
|
|
$form['workflow']['automenu_hide'] = array( |
|
|
'#type' => 'checkbox', |
|
|
'#title' => t('Hide automenu entry'), |
|
|
'#default_value' => variable_get('automenu_hide_' . $form['#node_type']->type, 0), |
|
|
); |
|
| 52 |
|
|
| 53 |
$form['workflow']['parentmenu'] = array( |
$form['workflow']['parentmenu'] = array( |
| 54 |
'#type' => 'select', |
'#type' => 'select', |
| 64 |
'#title' => t('Parent menu for !lang nodes', array('!lang' => $language->name)), |
'#title' => t('Parent menu for !lang nodes', array('!lang' => $language->name)), |
| 65 |
'#default_value' => variable_get('parentmenu' . $language->language . '_' . $form['#node_type']->type, 0), |
'#default_value' => variable_get('parentmenu' . $language->language . '_' . $form['#node_type']->type, 0), |
| 66 |
'#options' => $options, // TODO filter on menu items of current language |
'#options' => $options, // TODO filter on menu items of current language |
| 67 |
'#description' => t('Select the default menu for nodes written in !lang.', array('!lang' => $language->name)), |
'#description' => t('Select the default menu for nodes written in !lang.', array('!lang' => $language->name)), |
| 68 |
); |
); |
| 69 |
} |
} |
| 70 |
|
|
| 71 |
|
$form['workflow']['automenu_hide'] = array( |
| 72 |
|
'#type' => 'checkbox', |
| 73 |
|
'#title' => t('Hide automenu entry'), |
| 74 |
|
'#default_value' => variable_get('automenu_hide_' . $form['#node_type']->type, 0), |
| 75 |
|
'#description' => t('Set all auto generated menu items of this content type to hidden'), |
| 76 |
|
); |
| 77 |
|
|
| 78 |
|
|
| 79 |
} |
} |
| 80 |
} |
} |