I'm writing a Drupal 7 module. Therefore, parts of my implementation of hook_menu() look like this:
$items['admin/mymodule/a'] = array(
'title' => 'A',
'page callback' => 'mymodule_a',
'access arguments' => array('administer mymodule'),
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
$items['admin/mymodule/a/%id/edit'] = array(
'title' => 'Edit',
'page callback' => 'mymodule_edit',
'access arguments' => array('administer mymodule'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 1,
);
$items['admin/mymodule/a/%id/details'] = array(
'title' => 'Details',
'page callback' => 'mymodule_details',
'access arguments' => array('administer mymodule'),
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
Now what I'm trying to achieve is to hide links from the page titled 'A' to the secondary tabs, still having links among those secondary tabs, i.e. when accessing admin/mymodule/a, there should be no links to secondary tabs shown, while for admin/mymodule/a/42/edit there should be links added to both the .../42/edit and .../42/details page. I guess this should easily be achievable, but I can't figure out how... Thanks for your suggestions!