[drupal-devel] menu path question?

Andre Molnar mcsparkerton at yahoo.co.uk
Sat Feb 12 01:03:13 UTC 2005


See:
http://drupal.org/node/17022

A patch can be found there - but as Dries points out it may 'break' 
other modules.

Since newspaper/search/advanced is a single local task (of 
newspaper/search) - it doesn't show up.

andre

Chris Johnson wrote:
> 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