Closed mhuegel closed 6 years ago
Hi. By default -- and on purpose -- Twig does not expose every variable, function and class that the PHP context has access to. You can manually expose some functions or static class methods as documented here: https://github.com/fvsch/kirby-twig/blob/main/doc/functions.md#exposing-static-methods
But my advice would be to create Controllers to handle this kind of logic, instead of doing it in templates. See Kirby's docs: https://getkirby.com/docs/developer-guide/advanced/controllers
Thanks for your fast reply!
Using a controller as suggested worked just fine for me.
Hi there!
Is it possible to geht kirbys cookie::get to work with twig? Or is there any workarround?