Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.1k views
in Q2A Core by
edited by

Hello,

i created new plugin and every thing is great i want to add nav link on 

$qa_content['navigation']['main']

i made this code

 

$qa_content['navigation']['main']['newnav'] = array (
'url' => qa_path_html('qa-newnav'),
'label' => qa_lang_html('main/newnav'),
);
 
this link appear and every thing is good
 
my problem is the like appear only if i opend my plugin url i mean 
if ($request == 'qa-newnav')
 
when i go to any other page this nav link disappear
 
how can i do that without change any thing inside the core 
 
my plugin type is page i tried all others types and same result
 
and i tried to create another plugin to add this nav only and didn't work
 
----------------------------------------------------------------------------------------
Update !!
i found the solution :)
 
this is how to do that
 
create qa-theme.php file inside your theme and past this code
 
class qa_html_theme extends qa_html_theme_base
{
function nav_main_sub()
{
 
$this->content['navigation']['main']['navbar'] = array (
'url' => 'your url here',
'label' => 'some label',
);
 
$this->nav('main');
$this->nav('sub');
}
}
this will override nav_main_sub() and add any new link u want 
 
 
Best Regards
Ahmed

Please log in or register to answer this question.

...