How to create secondary local tasks or secondary tabs, also called sub tab (second level) menu items.
It was not clear to me why it was necessary to create a MENU_DEFAULT_LOCAL_TASK in every tab level. In order to tell drupal's menu system to show primary and secondary local tasks, there is a need to create a default local task every time. The default local task points to the same page as the parent item but has a path longer by one element.
Parent path:
'admin'
Default primary local task path:
'admin/home'
Default secondary local task path:
'admin/home/home'
All three menu items go to 'admin' and all three show 'admin' on the address bar. Both local tasks can share the same page callbacks.
The code inside your hook_menu() would look something like this.
$items['cart/admin'] = array(
'title' => 'Cart Administration',
'page callback' => 'cart_admin_home_page',
'access arguments' => array('access cart admin pages'),
);
$items['cart/admin/home'] = array(
'title' => 'Admin\'s Home',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['cart/admin/home/home'] = array(
'title' => 'Admin\'s Home',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
Check out the following link to understand how to set up secondary tabs or secondary local tasks. This took me several hours to find and understand.
There are many data storage types that are used to store information and acts as memory devices due to its rapidly advancing technologies used nowadays. Read on to enrich your knowledge about computer storage devices (RAM). Related articles are available at www.mgupload.net
Nelson
www.mgupload.net
You must be aware that you really have an awesome site. Does exactly what it sets out to do. Stimulating me to read much more of your post. Hope to see a lot more excellent posts from you shortly. Keep it up buddy.
Raine
InfoTech
www.shabsoft.net
I’m impressed. Very informative and trustworthy blog does exactly what it sets out to do. I’ll bookmark your weblog for future use.
Joseph
www.joeydavila.com
Your online Library
Post new comment