2.7.15. Dynamic

The output generated by the code between {dynamic} and {/dynamic} remains a dynamic content that is not cached by the output caching system. After enabling it for the template below:

Example 2.62. Dynamic content in cached templates

<p>This is a static date: {date('d.m.Y, H:i')}</p>
{dynamic}
<p>This is a dynamic date: {date('d.m.Y, H:i')}</p>
{/dynamic}

you will see that the first date was cached and it is not changing while the page is refreshed. The second date is always correct, because it is not cached.

Dynamic parts of template can be used with templates that are not cached, however they do nothing there.