Created
December 1, 2014 23:45
-
-
Save iainurquhart/fd35da453e2b07d5ff6d to your computer and use it in GitHub Desktop.
batch filters in twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for profileRow in entry.teamProfiles|batch(4) %} | |
<div class="row team_members_wrapper"> | |
{% for profile in profileRow %} | |
<div class="col-sm-6 col-md-3"> | |
<div class="team_member"> | |
{% set photo = profile.photo.first() %} | |
{% if photo is not empty %} | |
<img src="{{photo.url}}" alt="{{ profile.personName }}"> | |
{% endif %} | |
<h5>{{ profile.personName }}</h5> | |
{% if profile.titlePosition != '' %} | |
<small> {{ profile.titlePosition }}</small> | |
{% endif %} | |
<hr> | |
<p class="short_bio">{{ profile.shortDescription }}</p> | |
</div> | |
</div> | |
{% endfor %} | |
</div> | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment