XF 2.0 How to get current page controller name and action?

I can't see anything that'll let you get it directly (the route match doesn't seem to be stored anywhere), but this works:
PHP:
\XF::app()->router()->routeToController(\XF::app()->request()->getRoutePath());

(The XF class is available in templates)

Liam
 
It's part of the AbstractReply object, but it's not likely to be directly exposed in most cases. You'd likely need to trigger some code somewhere where the reply object is available (and complete).
 
Top Bottom