Forums / Setup & design / How to set a session variable?

How to set a session variable?

Author Message

Kevin Jonkers

Friday 18 November 2005 9:52:27 am

Is it possible to set a session variable in eZPublish? I don't want to keep passing around variables by GET or POST...

Ɓukasz Serwatka

Monday 21 November 2005 6:25:29 am

This is not possible from template by default. You can use e.g custom template operator however here you can expect some limitation because of view caching.

If the view cache has been generated for a page and the next user requests it the template code will not be run. Disable view cache for tpl might help but cost of doing this will be performance.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Kevin Jonkers

Monday 21 November 2005 8:12:44 am

How is it possible that a big system like EZ doesn't have a function for this?

Pretty stupid I need to pass around variables all the time, but I guess that is the way to go...