[support] Need help regarding hook_menu in drupal 6

pinky pinky at evakoss.com
Wed Sep 17 11:39:31 UTC 2008


Hi All!

i am converting a drupal 5 module to drupal 6 module. i know 'hook_menu' is
different here in drupal6

my menu item for drupal5 

if(arg(0) == 'published' || arg(0) == 'upcoming' || arg(0) == 'archived'){

$items[] = array(
'path' => arg(0),
'title' => t('View'),
'callback' => 'node_list',
'callback arguments' => array(arg(0)),
'access' => TRUE,
'type' => MENU_CALLBACK_ITEM);
}

i have changed this to 

if (arg(0) == 'published' || arg(0) == 'upcoming' || arg(0) == 'archived') {
$items['%'] = array(
'title' => t('View'),
'page callback' => 'node_list',
'page arguments' => array(0),
'access callback' => TRUE,
'type' => MENU_CALLBACK_ITEM,
);
}

please tell where i am doing wrong ??

Thanks

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080917/f29954d0/attachment.htm 


More information about the support mailing list