Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
{% set items = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] %}
{% for row in items|batch(3, 'No item') %}
<div class="row">
{% for column in row %}
<div class="element col-xs-4">
{{ column }}
</div>
{% endfor %}
</div>
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment