Skip to content

Instantly share code, notes, and snippets.

@superbiche
Created September 28, 2018 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superbiche/742d9f329ee387211dba2aaf777aa38f to your computer and use it in GitHub Desktop.
Save superbiche/742d9f329ee387211dba2aaf777aa38f to your computer and use it in GitHub Desktop.
Twig rows
{% block teasers_title %}
<div class="section-title">{{ '_en_ Activities'|t }}</div>
{% endblock teasers_title %}
{% block teasers_list %}
{% for line in rows|batch(rows|length / 3) %}
<div class="grid-3-small-1 has-gutter-xl results-row view-activities">
{% for row in line %}
{% set row_classes = [
default_row_class ? 'views-row',
loop.last ? 'views-row-last'
] %}
<div{{ row.attributes.addClass(row_classes) }}>
{{ row.content }}
</div>
{% endfor %}
</div>
{% endfor %}
{% endblock teasers_list %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment