Jake B.
Well-known member
I'm working on an add-on that will require a variable to be available in all templates, so I tried to use the container_public_params code event with the following:
It is running, and I am able to access the variable inside XenForo_Dependencies_Public::getEffectiveContainerParams however, I cannot use $testParam inside a template.
Code:
public static function containerPublicParams(array &$params, XenForo_Dependencies_Abstract $dependencies)
{
$visitor = XenForo_Visitor::getInstance();
$params['testParam'] = $visitor->hasPermission('test', 'testPermission');
}
It is running, and I am able to access the variable inside XenForo_Dependencies_Public::getEffectiveContainerParams however, I cannot use $testParam inside a template.