I'm trying to create a tabbed menu system with hook_menu()
following the hook documentation and Clive's answer. I am using the following code.
/**
* Implements hook_menu().
*/
function newforms_menu() {
$items = array();
$items['admin/config/content/newforms'] = array(
'title' => 'NewForms',
'description' => 'Configure web forms via drag and drop.',
'page callback' => 'drupal_get_form',
'page arguments' => array('newforms_administration_settings'),
'access arguments' => array('administer newforms module'),
'file' => 'newforms.admin.inc',
);
$items['admin/config/content/newforms/list'] = array(
'title' => 'Forms',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/config/content/newforms/components'] = array(
'title' => 'Components',
'type' => MENU_LOCAL_TASK,
'page arguments' => array('newforms_components_list'),
);
return $items;
}
I would expect this to produce two tabs, labeled 'Forms' and 'Components', but it does not. I see no tabs. On admin/config/content/newforms/list, I get the same page as admin/config/content/newforms; on admin/config/content/newforms/components, I get "You are not authorized to access this page."
I've cleared cache and ran cron, disabled the module, uninstalled it, reinstalled it, cleared cache, and ran cron; I get the same results.
Both callback argument form functions are defined in newforms.admin.inc.
Do you have any idea as to what is going on here?