We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Partials and Session

Good afternoon, please how to get sessions values on partials ?! is it necessary to use PartialController ?!

Good afternnon,

Are you using Volt?



5.8k
edited May '15

Yeap, I use volt. well I have 3 variables on my session used in severale views, so the idea is about creating partial and include it into my volt files.

This should work:

{{ session.get("value") }}


5.8k

Thanx Andres



31.2k
Accepted
answer
edited May '15

Partials just extends a view to help manage your code. so when working on partial blocks just assume you are working on the view implementing that partial block.



5.8k

Hello Dominic, when you say assume you are working on the view that implement partial it means that there is a controller to initialize your view ?



5.8k

Thanx Dominic.