template
Description
- Renders all widgets for a given template key (e.g.,
main). Skips output when widget preview mode is active.
Inputs
- Argument:
templateKey(string) - Reads:
env.getGlobal('templates'),env.getGlobal('isIframe'),env.getGlobal('showDevTools')
Usage
{% template 'main' %}
Rendered Output
Example main content
<main id="template-main">
<section class="hero">
<h1>Summer Collection</h1>
<a class="btn btn-primary" href="/collections/summer">Shop now</a>
</section>
<section class="grid">
<article class="card">Card #1</article>
<article class="card">Card #2</article>
</section>
</main>