Forums / General / Update variable in a content cached template
Daniele Nocentini
Thursday 25 August 2011 1:42:08 am
I have a site with a big menu on top in pagelayout.tpl, in this menu a user can specify a city where it comes from. when a user click on a link of city a custom module it's called and I write a cookie with the id of a node that corresponding of a city, now if a user go to other node/view of a content object I can recover the value of a cookie so I can change information depend on a city that user has chosen.
The problem is if a user change a city because the cookie is updated but the value in template view full no because it's cached from content cache.
I know that I can use this:
{set-block scope=root variable=cache_ttl}0{/set-block}
but there is another way to bypass content cache when I want to read a cookie value?
Antica Bottega Digitale srl http://www.abd.it
Hamdi Laadhari
Thursday 25 August 2011 6:31:06 am
why don't you try using ezpreference system to save tha piece od data, ezpreference is a cache criteria
Certified eZ Publish Entreprise 4.5 http://www.laadhari.fr