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

Liam W

Well-known member
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:
(The XF class is available in templates)



XenForo developer
Staff member
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).