Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
561 views
in Plugins by
edited by

I have the open questions plugin installed and would like a link to the page in the sub-navigation bar. I have polls plugin and that is displayed. Which file do I need to butcher to get this working please?

While I'm at it, is there a way to get the sidebar to show on custom pages, including polls, open questions?

Thanks,
Dave

EDIT: I took the following code from the polls plugin and added it to qa-theme.php and edited it, the 'open questions' link now shows up on every page apart from the 'open questions' page.

function nav_list($navigation, $class, $level=null)
{
if($class == 'nav-sub') {
$navigation['open-questions'] = array(
 'label' => qa_html('Open Questions'),
 'url' => qa_path_html('open-questions'),
);
if($this->request == 'open-questions') {
unset($navigation['special']);
$newnav = qa_qs_sub_navigation(null,null);
$navigation = array_merge($newnav, $navigation);
unset($navigation['recent']['selected']);
$navigation['open-questions']['selected'] = true;
}
}
if(count($navigation) > 1 || $class != 'nav-sub') qa_html_theme_base::nav_list($navigation, $class, $level=null);
}

Please log in or register to answer this question.

...