I
I
Ivan Kondratiev2015-06-20 13:51:54
symfony
Ivan Kondratiev, 2015-06-20 13:51:54

How to access sessions in symfony2 template(twig)?

Is it possible to get session data in a template without explicitly passing it there?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Idaho37, 2015-06-20
@inik23

Maybe.
{{ app.session.get("session_name") }}

S
Sergey, 2015-06-20
Protko @Fesor

It is possible, but why? Pass everything explicitly and there will be fewer problems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question