I’m currently trying to read the value of a cookie which needs to be accessible on several instances (e.g. template/tpl.php and snippets/snip.php). Instead of checking the cookie multiple times I’d like to put the value into a variable.
How can I add a variable to be accessible on every snippet used in a template?
The site-controllers doesn’t seem to do the trick since it gets overwritten by other controllers.
Copy-pasting the code into every controller doesn’t feel right, especially when stuff needs to be changed.