cache issue

Author Message

Dan Ruth

Wednesday 12 March 2008 8:23:41 am

I have an event object (container) and within it I have presentation objects. The presentation objects may or may not have related speaker objects.

I have written a piece of logic in my event line template to display an icon based on the following criteria:

1. display a grey icon if the event doesnt have any presentations
2. display a green icon if there are presentation(s) all with related speakers
3. display a red icon if there are any presentation(s) without a related speaker

The logic works, however i am encountering cache issues. For example, if a green icon is displaying in my event listing, and i add to that event a presentation without a related speaker and browse back to the event listing, the icon will not turn red until I clear the content cache. Curiously, if I remove that presentation and browse back to the event listing, the icon will go back to red without clearing the cache.

I have added

{set-block scope=root variable=cache_ttl}0{/set-block}

to the event line template and that has not helped. I have experimented as well with cache-blocks, but cannot seem to find a way to use a cache-block to prevent cacheing of the template code that displays the icon.

Any suggestions or ideas would be much appreciated. Thanks!

André R.

Wednesday 12 March 2008 9:03:20 am

Try scope=global

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Dan Ruth

Wednesday 12 March 2008 9:28:10 am

Worked like a charm. Thank you for your response, very much appreciated.

Dan

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.