Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Just exceptional. Thank you so much, Jack, you smashed it.

— Hugo, Developer

as Modifier

Alias an array variable as another name, allowing you to massage your data to reused shared components and templates.

blocks:
-
type: text
content: I love to eat tacos in the bathroom.
-
type: photo
photo: /assets/img/baño-tacos.jpg
{{ blocks as="sets" }}
{{ sets }}
{{ partial:type }}
{{ /sets }}
{{ /blocks }}
<!-- Each block would be rendered with its own partial matching the {{ type }} var -->
 
<div class="text">
<p>I like to eat tacos in the bathroom.</p>
</div>
<div class="photo">
<img src="/assets/img/baño-tacos.jpg">
</div>
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →