[development] How affect a node on a subitem menu ?

Cédric Joubert cedjoubert at gmail.com
Thu Mar 18 12:46:20 UTC 2010


I have created a new node from the Create "content page" (say node/20)...
and then i need to affect my node to the sub menu item below.
How i can do please ?

Because the subitem link I need is to access my node like this :

but not as described by my menu :

I think i could call the "test" callback, loading and theming my node... but
maybe is there a simpler way ?  (override path or link...)

function list_projects_menu() {

  $items['menu1'] = array(
    'title' => t('my infos'),
    'page callback' => 'show_page',
    'access callback' => TRUE,
    'type' => MENU_NORMAL_ITEM,

  $items['menu1/subitem1'] = array(
    'title' => t('my infos'),
    'page callback' => 'test',       // node/20 ?
    'access callback' => TRUE,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100318/5039a706/attachment.html 

More information about the development mailing list