How can I have a nested loop and then carry on from the previous loop?
Example:
{% for image in site_images[page.id].images %}
<div class="container">
<div class="item">
<img src="{{ image[loop.index0] }}" />
<img src="{{ image[loop.index0] }}" />
<img src="{{ image[loop.index0] }}" />
<img src="{{ image[loop.index0] }}" />
</div>
</div>
<div class="container">
<div class="item">
<img src="{{ image[loop.index0] }}" />
<img src="{{ image[loop.index0] }}" />
<img src="{{ image[loop.index0] }}" />
<img src="{{ image[loop.index0] }}" />
</div>
</div>
....
{% endfor %}
How can I make it show 4 images in the first .container > .item div
, then come out create a new .container > .item div
and carry on so it would be image[4]