Path

ez.no / ezpublish / documentation / incoming / persistent template variable


Persistent template variable

These documentation pages are no longer maintained. Please visit the new documentation site.

This feature is new in eZ publish 3.4.4 and 3.5.

A template variable named 'persistent_variable' can be set and retrieved regardless of cache and template compiling. It can for example be set in node/view/full.tpl and retrieved in pagelayout.tpl, even if content caching and template compiling is on. It can be set for example with

{set scope=global persistent_variable=42}

and fetched with

{$module_result.content_info.persistent_variable}

Comments

Use globale variable

hi,

Is it possible to use a globale variable between two template.

In fact I try to set a variable in a first template and retrieve it in a second.

Doesn't seem to work