I dont know what i doing wrong but for reasons the tab on user page doesnt appear! i have like three tabs which i place my self in custom module and they ok.. But now trying to use the principle i used nothing works. below is my code! Any suggestions?
$items=array();
$items['user/%user/mysite-news'] = array(
'title' =>t('Мой Новости'),
'description' => t('yo news.'),
'page callback' => 'mysite_news',
'page arguments' => array(1),
'access callback' =>array('view kupon'),
'type' =>MENU_LOCAL_TASK,
);
$items['user/%user/mysite-news/my-news'] = array(
'title' =>t('Мой Новости'),
'description' => t('see your news.'),
'page callback' => 'mysite_news',
'page arguments' => array(1),
'access callback' => TRUE,
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight'=>-15,
);
//and my call back function
function mysite_news($account){
$my_name=t('my name is $c',array('$c'=>$account->name));
return $my_name;
}
?>
if i visit the link user/1/mysite-news/my-news
the result is displayed, "my name is admin". But the tab doesnt show on user page.. please help.