Thanks again monk333, greeat tip!
This is what I have so far in the advanced theme, added it to existing override of function nav_main_sub():
function nav_main_sub() {
$this->output('custom stuff');
$this->nav('main');
$this->nav('sub');
// add subnavigation 'favorites' to user page
if($this->template=='user') {
$myhandle = basename( qa_path_html(qa_get_logged_in_handle()) );
$myurl = strtok($_SERVER['REQUEST_URI'],'?');
if($myurl == '/user/'.$myhandle){
$this->content['navigation']['sub']['favorites'] = array(
'label' => qa_lang_html('misc/nav_my_favorites'),
'url' => qa_path_html('favorites'),
);
}
}
}
Actually it should add an element to the subnavigation but it does not :(
I printed out the associative array $this->content['navigation']['sub'] but the new element is not inside.
Could it be that the subnavigation is overwritten later and so my added element gets lost?
---
SOLVED:
Put the blue code block before $this->nav('sub'); and it works!
---