ez.no / exponential / documentation / reference / template functions / miscellaneous / run-once
{run-once}
{* tpl code *}
{/run-once}
| Name | Type | Description | Required |
|---|
Assures that the content of the block is run only once in a page view, it uses the current filename
and placement to figure this out. This can be useful if you want a text to appear once or a calculation
to be run once for included templates or loops. Requires an end tag.
In this example, "My header" will be printed only once
{let elements=array('element1', 'element2', 'element3')} {section loop=$elements} {run-once} My header<br/> {/run-once} {$item}<br/> {/section} {/let}
log in or create a user account to comment.
Comments