By gr8cms on
Hi to all,
I added a static page by the following code. I want to add a new tab in above the page.
in hook_menu, my code is:
$items['staticPage'] = array(
'title' => t('Static Page'),
'description' => 'A demo page for testing code.',
'access arguments' => array('access content'),
'page callback' => 'staticPage_form',
);
$items['staticPage/settings'] = array(
'title' => t('Settings'),
'page callback' => 'drupal_get_form',
'page arguments' => array('staticPage_settings'),
'access arguments' => array('access content'),
'type' => MENU_LOCAL_TASK,
);
return $items;
but the tab is not shown above. please help me...
Comments
Use MENU_DEFAULT_LOCAL_TASK
Try adding MENU_DEFAULT_LOCAL_TASK to hook_menu():
Thanks, it work exactly.
Thanks, it work exactly.