Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
745 views
in Q2A Core by
How can I have the user nav outside QA?

If the user goes to a page outside QA, I would like to have the same user nav present, with welcome username, manage account or login if not logged in?
by
Any solution found?

1 Answer

0 votes
by
by
Thanks, but i'm not following how i can get the full $this->nav('user') outside QA? I need exactly the same displayed?
by
That's a bit harder. You could try something like this:

require_once QA_INCLUDE_DIR.'qa-page.php';
require_once QA_INCLUDE_DIR.'qa-theme-base.php';

$themeclass=qa_load_theme_class(qa_opt('site_theme'), 'custom', qa_content_prepare(), 'anything');
$themeclass->nav_main_sub();

I haven't tested this code so there might be issues.
by
That seems to load the whole theme (ie headers etc).?
by
I tried to use your code, does not seem to work, I am getting error messages when calling the page.php file

http://www.question2answer.org/qa/12647/undefined-variable-qa_request_lc-in
by
Right, it seems you can't really include qa-page.php outside of the full Q2A flow. But this might work better in Q2A 1.5 so you could try that.
...