OK ... I've burned half a day trying to get this to work. It must be something easy that I'm missing. But I give up.
I'm writing a module which talks to another database ("facilities"). I need to view, comment, and edit entries from this other database ... each of these will be a LOCAL_TASK ... View will be the default.
I can get the menu to appear and hook into the right callbacks with the following code:
$items[] = array('path' => 'facility',
'title' => t('Facility Profile'),
'callback' => 'facility_page',
'access' => user_access('access content'),
'type' => MENU_SUGGESTED_ITEM);
$items[] = array('path' => 'facility/',
'title' => t('View'),
'callback' => 'facility_page',
'access' => user_access('access content'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10);
$items[] = array('path' => 'facility/'. arg(1) .'/edit',
'title' => t('Edit'),
'callback' => 'facility_edit',
'access' => user_access('access content'),
'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'facility/'. arg(1) .'/feedback',
'title' => t('Feedback'),
'callback' => 'facility_feedback',
'access' => user_access('access content'),
'type' => MENU_LOCAL_TASK);
The problem is that arg(1) keeps getting filled in with the string "modules" in the menu links for the "feedback" and "edit" menu tabs. And the node ID number never appears in the menu tab link for the default "View" tab.