Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
6.2k views
in Q2A Core by

In advanced theme I'dl ike to check if the user is visiting the "unanswered" page using:

if ($this->template=='unanswered') { ... }

But it is not working, what am I missing?

 

From qa-page-admin-widgets.php I see the list of templates, including "unanswered":

account
activity
admin
ask
categories
favorites
feedback
hot
ip
login
message
qa
question
questions
register
search
tag
tags
unanswered
updates
user
users
 

1 Answer

0 votes
by
selected by
 
Best answer
if ($this->template == 'unanswered') this is working perfectly. I have tested. Cross check if any speling mistake or so
by
it was no typo, but I overlooked an if statement that I included a couple of lines above =)
by
Oh yeah! I thought so but than again I thought if statement may not be an issue in you case. :P
...