[drupal-devel] menu path question?

Chris Johnson chris at tinpixel.com
Sat Feb 12 00:56:41 UTC 2005


This works:

$items[] = array('path' => 'newspaper', 'title' => t('view1'), 'type' => 
MENU_CALLBACK,   'callback' => 'newspaper_search', 'access' => TRUE);
$items[] = array('path' => 'newspaper/search', 'title' => t('Search'), 'type' 
=> MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
$items[] = array('path' => 'newspaper/advanced', 'title' => t('Advanced 
search'), 'type' => MENU_LOCAL_TASK, 'callback' => 'newspaper_search');


This does not:

$items[] = array('path' => 'newspaper', 'title' => t('view1'), 'type' => 
MENU_CALLBACK,   'callback' => 'newspaper_search', 'access' => TRUE);
$items[] = array('path' => 'newspaper/search', 'title' => t('Search'), 'type' 
=> MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
$items[] = array('path' => 'newspaper/search/advanced', 'title' => t('Advanced 
search'), 'type' => MENU_LOCAL_TASK, 'callback' => 'newspaper_search');


The only difference is the path on the second local task:

newspaper/advanced
newspaper/search/advanced


Am I asking the menu system to do something it wasn't meant to do?

--
Chris Johnson
irc: cxj




More information about the drupal-devel mailing list