Categories
How to output $_SESSION in Twig template?
Answer the question
In order to leave comments, you need to log in
$twig = new Twig_Environment(...); $twig->addGlobal('session', $_SESSION); // в шаблоне доступ через {{ session.key }}
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question