Is it possible to get the title of the currently active secondary tab?
I'd like to re-use the the title of this tab later on in the content. I found menu_local_tasks(1)
which comes close, but this returns full themed output. I just want the title as I've defined it in hook_menu()
.
Edit:
My hook_menu
structure (trimmed to just the elements in ,not including sibling elements):
$items['events/%node'] = array(
'title' => 'Events',
'page callback' => 'page_events',
'page arguments' => array(1),
'type' => MENU_NORMAL_ITEM,
);
$items['events/%node/stats'] = array(
'title' => 'Stats',
'access callback' => TRUE,
'page callback' => 'page_stats',
'page arguments' => array(1),
'type' => MENU_LOCAL_TASK,
'weight' => 3,
);
$items['events/%node/stats/year'] = array(
'title' => 'This Year',
'access callback' => TRUE,
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
);
$items['events/%node/stats/lastyear'] = array(
'title' => 'Last Year',
'access callback' => TRUE,
'page callback' => 'page_stats',
'page arguments' => array(1),
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
For example, when at the page events/%node/stats/year
, I'd like to get 'This Year'
.