Code:
{% for block in entry.testimonials %}
<div class="col-24 {% if loop.last %}gutter-bottom{% else %}gutter-bottom--none{% endif %}">
<div class="section inner">
<div class="col-17 {% if loop.index0 is not divisible by(2) %}last float-right {% endif %}">
{% switch block.type %}
{% case "testimonials" %}
<h3>{{ block.personsName }}</h3>
{{ block.quote }}
</div>
{% for asset in block.image %}
<div class="col-7 circle-image-container {% if loop.index0 is divisible by(2) %}last{% endif %}">
<img src="{{ asset.getUrl() }}" alt="{{ asset.title }}"/>
</div>
{% endfor %}
{% endswitch %}
</div>
</div>
{% endfor %}
Can anyone point out why the...
loop.index0 is divisible by(2)
I have on the div around the image isn't working. I'm getting the 'last' class on everything. The one on the previous div is working fine.
What am I missing?
EDIT:
I've just realised it's in it's own image loop causing the problem. How can I get around this?