Hello,
What is the best way to find the current route? I want something that will work with any Route Filters that may be in place.
I'm hoping to use something similar to the code below.
Thanks,
What is the best way to find the current route? I want something that will work with any Route Filters that may be in place.
I'm hoping to use something similar to the code below.
PHP:
public static function frontControllerPreView(XenForo_FrontController $fc, XenForo_ControllerResponse_Abstract &$controllerResponse, XenForo_ViewRenderer_Abstract &$viewRenderer, array &$containerParams)
{
$route = $fc->route();
if (!XenForo_Visitor::getUserId() && $route != 'resources')
{
$containerParams += array(
'containerTemplate' => 'LOGIN_PAGE_CONTAINER',
'contentTemplate' => 'error_with_login'
);
}
}
Thanks,
Last edited: