By mrcniceguy on
I AM TRYING TO SHOW A 3 LEVEL TAB ON THE USER PROFILE , BUT I JUST CANT FIND A WAY OF DOING IT.
I MANNED TO GET SECOND LEVEL WORK BUT NOT 3,THIRD LEVEL IS WHAT I NEED.
below is what i have.
/**
*patners page with all the tabs
*/
$items['user/%user/patners'] = array(
'title' => t('My deals'),
'description' => t('this is to show patners ther items'),
'page callback' => 'patners_page',
'page arguments' => array(1),
'access arguments' => TRUE,
'type' =>MENU_LOCAL_TASK,
'weight'=>-18,
);
$items['user/%user/patners/coupon'] = array(
'title' =>'купоны',
'page callback' => 'patners_page',
'page arguments' => array(1),
'access callback' => TRUE,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['user/%user/patners/statistics'] = array(
'title' => 'Статистик',
'page callback' => 'partners_statistics',
'page arguments' => array(1),
'access callback' => TRUE,
'type' => MENU_LOCAL_TASK,
);
$items['user/%user/patners/coupon/all'] = array(
'title' =>'все купоны',
'page callback' => 'patners_page',
'page arguments' => array(1),
'access callback' => TRUE,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['user/%user/patners/coupon/used'] = array(
'title' =>'использованы',
'page callback' => 'patners_coupon_used',
'page arguments' => array(1),
'access callback' => TRUE,
'type' => MENU_LOCAL_TASK,
);
$items['user/%user/patners/coupon/pending'] = array(
'title' =>'Статус',
'page callback' => 'patners_pending_coupons',
'page arguments' => array(1),
'access callback' => TRUE,
'type' => MENU_LOCAL_TASK,
);
return $items;
Comments
Yes
Yes, It is possible.
--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.
@chx,Please explain how i can
@chx,Please explain how i can achieve this.
Anyone to Help me with This
Anyone to Help me with This question??
hey mrcnuceguy,looks like no
hey mrcnuceguy,
looks like no one ever answered you, and I just ran into the same issue. I found this was the solution.
http://api.drupal.org/api/drupal/includes!menu.inc/function/menu_local_t...
In your theme you can print the level of menu_local_tasks using
NOTE: the level is indexed starting at 0
this only outputs the "li"s though so you will most likely need to wrap it in something like
Thanks
Thanks. This points me in the right direction. But I still don't understand where in my theme I should print the statement above. If my tabs/tasks are on a specific page, should I use a template file for that page?
@Jevedor thankx man, i will
@Jevedor thankx man, i will give a try.
Is there any workable solutions?
I have tried the methods shown here but it seems not working. Could anyone points me to a right direction.
It is well appreciated.
Thanks,
SK2013