Skip to content

Instantly share code, notes, and snippets.

@marekkalnik
Created November 28, 2011 18:33
Show Gist options
  • Save marekkalnik/1401438 to your computer and use it in GitHub Desktop.
Save marekkalnik/1401438 to your computer and use it in GitHub Desktop.
Display item in multiple rows in twig
{% for address in customer.getAddresses %}
{% if loop.index % 3 == 1 %}
<div class="row">
{% endif %}
{# display item #}
{% if loop.index % 3 == 0 or loop.last %}
</div>
{% endif %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment