I am learning how to use hook_menu(). I am at a point where I have a question and not figure it out. I have a local task button inline with View and Edit and I want 4 sub-local_task buttons. See chart below.
View | Edit | **Outcomes** |
*Outcomes Viewer* | Add New User | Add Bulk Ghost | Registration Report
However, the first button(Outcomes Viewer) is missing and I cannot figure out how to get it to show up. Below is the menu code within the function. The Outcomes Viewer is a view. I am mixing this with some custom code and views as well. (*Drupal 7, Views 3)
$items['node/%node/ecg-outcomes'] = array(
'title' => 'Outcomes',
'access arguments' => array(1),
'type' => MENU_LOCAL_TASK,
'weight' => 50,
);
$items['node/%node/ecg-outcomes/'] = array(
'title' => 'Outcomes Viewer',
'access arguments' => array(1),
'page arguments' => array(1),
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
$items['node/%node/ecg-outcomes/add-bulk-ghost'] = array(
'title' => 'Add Bulk Ghost',
'page callback' => 'entity_ghost_participant_report',
'page arguments' => array(1),
'access callback' => 'entity_ghost_participant_access_report_tab',
'access arguments' => array(1),
'type' => MENU_LOCAL_TASK,
'file' => 'entity_ghost_participant.reports.inc',
'weight' => 11,
);
$items['node/%node/ecg-outcomes/add-new-user'] = array(
'title' => 'Add New User',
'page arguments' => array(1),
'access arguments' => array(1),
'type' => MENU_LOCAL_TASK,
'weight' => 14,
);