| 1 |
<?php |
<?php |
| 2 |
// $Id: automenu.module,v 1.1.4.1 2008/10/10 14:40:11 danielfs Exp $ |
// $Id: automenu.module,v 1.1.4.2 2009/05/05 12:29:33 farbridges Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_nodeapi(). |
* Implementation of hook_nodeapi(). |
| 18 |
'link_path' => 'node/' . $node->nid, |
'link_path' => 'node/' . $node->nid, |
| 19 |
'link_title' => $node->title, |
'link_title' => $node->title, |
| 20 |
'plid' => $parent_menu[1], |
'plid' => $parent_menu[1], |
| 21 |
|
'hidden' => variable_get('automenu_hide_'.$node->type, 0), |
| 22 |
//'customized' => true, // ? |
//'customized' => true, // ? |
| 23 |
); |
); |
| 24 |
if (!menu_link_save($new_menu)) { |
if (!menu_link_save($new_menu)) { |
| 48 |
|
|
| 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 |
|
|
| 52 |
|
$form['workflow']['automenu_hide'] = array( |
| 53 |
|
'#type' => 'checkbox', |
| 54 |
|
'#title' => t('Hide automenu entry'), |
| 55 |
|
'#default_value' => variable_get('automenu_hide_' . $form['#node_type']->type, 0), |
| 56 |
|
); |
| 57 |
|
|
| 58 |
$form['workflow']['parentmenu'] = array( |
$form['workflow']['parentmenu'] = array( |
| 59 |
'#type' => 'select', |
'#type' => 'select', |
| 60 |
'#title' => t('Default parent menu'), |
'#title' => t('Default parent menu'), |