Change MajorSection outside of the route?

Chris D

XenForo developer
Staff member
#2
Yep, we do this in various controllers in XF, for example setting "forums" to be the page section when you're viewing the "find-new/posts" page.

In the Controller you can use:
PHP:
$this->_routeMatch->setSections('forums');
Where 'forums' is the desired section.
 
Top