Three level tab on user profile page I am trying to show a 3 level tab on the user profile page, but I cannot find a way of doing it.  I've managed to get a second level working, on my custom module on drupal 7.

&lt;?php
/**
 *patners page with all the tabs
 */

$items['user/%user/patners'] = array(
    'title' =&gt; t('My deals'),
    'description' =&gt; t('this is to show patners ther items'),
    'page callback' =&gt; 'patners_page',
    'page arguments' =&gt; array(1),
    'access arguments' =&gt; TRUE,
    'type' =&gt;MENU_LOCAL_TASK,
    'weight'=&gt;-18,
);
$items['user/%user/patners/coupon'] = array(
    'title' =&gt;'??????',
    'page callback' =&gt; 'patners_page',
    'page arguments' =&gt; array(1),
    'access callback' =&gt; TRUE,
    'type' =&gt; MENU_DEFAULT_LOCAL_TASK,
);
$items['user/%user/patners/statistics'] = array(
    'title' =&gt; '?????????',
    'page callback' =&gt; 'partners_statistics',
    'page arguments' =&gt; array(1),
    'access callback' =&gt; TRUE,
    'type' =&gt; MENU_LOCAL_TASK,
);
$items['user/%user/patners/coupon/all'] = array(
    'title' =&gt;'??? ??????',
    'page callback' =&gt; 'patners_page',
    'page arguments' =&gt; array(1),
    'access callback' =&gt; TRUE,
    'type' =&gt; MENU_DEFAULT_LOCAL_TASK,
);
$items['user/%user/patners/coupon/used'] = array(
    'title' =&gt;'????????????',
    'page callback' =&gt; 'patners_coupon_used',
    'page arguments' =&gt; array(1),
    'access callback' =&gt; TRUE,
    'type' =&gt; MENU_LOCAL_TASK,
);
$items['user/%user/patners/coupon/pending'] = array(
    'title' =&gt;'??????',
    'page callback' =&gt; 'patners_pending_coupons',
    'page arguments' =&gt; array(1),
    'access callback' =&gt; TRUE,
    'type' =&gt; MENU_LOCAL_TASK,
);
return $items;
?&gt;
Drupal doesn't provide third level local tasks by own. You have to implement it, something like this:

/**
 *  @see: menu_local_tabs()
 */
function my_module_menu_local_tabs() {
  return array(
    '#theme' =&gt; 'menu_local_tasks', 
    '#primary' =&gt; menu_primary_local_tasks(), 
    '#secondary' =&gt; menu_secondary_local_tasks(),
    '#tertiary' =&gt; my_module_tertiary_local_tasks(),
  );
}

/**
 * @see: menu_secondary_local_tasks()
 */
function my_module_tertiary_local_tasks() {
  // The index of local task starts from 0, so you need the 2 level of local tasks.
  $links = menu_local_tasks(2);
  // Do not display single tabs.
  return ($links['tabs']['count'] &gt; 1 ? $links['tabs']['output'] : '');
}

function my_module_preprocess_page(&amp;$vars) {
  $variables['tabs'] = my_module_menu_local_tabs();
}


All of this code based on core's localtask generation function, it's normally alterable, translation-ready, access checked:

menu_local_tabs()

menu_secondary_local_tasks()