I've seen it several times before in answers but I can't for the life of me find it now.
How do you get the current page or section, e.g. "question" or "ask"? It was something like $this->request in a theme.
Can anyone post an answer to solve this once and for all?