hook_menu_local_tasks() works for the top level tabs, but the secondary tabs don't seem to have an equivalent. Does anyone know how I can modify those?

  • There is no hook such as hook_menu_local_tasks(). – apaderno Jul 22 '11 at 22:00
$primary = menu_local_tasks(0);

$secondary = menu_local_tasks(1);

See: http://api.drupal.org/api/drupal/includes%21menu.inc/function/menu_local_tasks/7

It's actually not a hook, it's just a function that gathers the items while in context.

There is a hook to alter the items: http://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu_local_tasks_alter/7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.