Modifier: as


Alias an array variable with a key, giving you some useful markup/iteration options.

blocks:
  -
    type: text
    content: I love to eat tacos in the bathroom.
  -
    type: photo
    photo: /assets/img/baño-tacos.jpg
{{ blocks as="block" }}
  {{ block | partial:type }}
{{ /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>
Last modified on March 7, 2017