I want a page where a user can create 3 different content types : "Machine" , 'Equipment" or "Services" . My goal is to implement 3 tabs for each content type node creation form.
I implemented hook_menu
like below :
function MyMODULE_menu() {
$items['instrument'] = array(
'title' => 'Instrument',
'type' => MENU_NORMAL_ITEM,
'menu_name' => 'main-menu',
);
$items['instrument/machine'] = array(
'title' => 'Machine',
'type' => MENU_DEFAULT_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => 'product_node_form',
);
$items['instrument/equipment'] = array(
'title' => 'Equipment',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => 'equipments_node_form',
);
$items['instrument/service'] = array(
'title' => 'Service',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => 'member_profile_node_form',
);
return $items;
}
After enabling my module, I expected that the menu item should be in main menu, but it wasn't there and I got a 'page not found error' when targeting "mywebsiteaddress/instrument" .
Where is my mistake?