Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by
edited by
If one wants to show something on selected pages only he can use:

if ($this->template=='  ') {}  or if ($this->template=='questions')

but how would one refer exclusively to the single question pages to show something only on question pages ?


Thanks and best regards


Edit: Anyone knows that ?
Same for v1.5:


if ($this->template==' ')

does not longer work for accessing the homepage.

What would one use now if he wants to refer to the homepage only.

question, questions, unanswered, tags and so on are still fine.
Found it: To refer to the home page one has to use

if ($this->template=='qa')

1 Answer

+1 vote
Best answer

On the question page, $this->template will contain 'question' (singular).

There is an "ask related question" button, or you can also use the "Ask a Question" button at the top.  Best not to post questions as comments to other questions, especially those 9 months old!
Yes, but you see the "comment" button is for commenting.  The "ask related question" button is for asking related questions.  I'm just trying to help, not spam you for points.  Posting questions as comments won't get you answers - it might get you flagged for not following board protocol, though.