Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
8.6k views
in Q2A Core by
Hi, I am using Q2A 1.7 with the Snow theme.

Is there any way to add the "Unanswered" link to the submenu of "Questions" instead of the main menu ? I want it to be in the submenu with: Recent, Unanswered Hot!, Most votes, Most answers, Most views ...

Thanks
Q2A version: 1.7

1 Answer

+2 votes
by

You could use a similar approach to the one I explained here: http://www.question2answer.org/qa/47018

1. Edit the qa-theme/<your-theme>/qa-theme.php file

2. Add (or merge, if it already exists) this function:

public function initialize() {
    $request = 'unanswered';
    $categorySlugs = qa_request_parts(1);
    if (isset($categorySlugs)) {
        foreach ($categorySlugs as $slug) {
            $request .= '/' . $slug;
        }
    }
    $unansweredNav = array(
        'url' => qa_path_html($request),
        'label' => qa_lang_html('main/nav_no_answer'),
    );
    switch ($this->template) {
        case 'questions':
            $this->content['navigation']['sub']['unanswered'] = $unansweredNav;
            break;
        case 'unanswered':
            $fullSubNav = qa_qs_sub_navigation(null, categorySlugs);
            $unansweredNav['selected'] = true;
            $fullSubNav['activity'] = $unansweredNav;
            $fullSubNav['recent']['selected'] = false;
            $this->content['navigation']['main']['unanswered']['selected'] = false;
            $this->content['navigation']['main']['questions']['selected'] = true;
            $this->content['navigation']['sub'] = $fullSubNav;
        default:
    }

    parent::initialize();
}

...