Based on the solution in this post: https://stackoverflow.com/a/72855239/5160621 I have a structure of repeating items with extra divs after every fourth item:
{% for values in items|batch(4) %}
{% for value in values %}
<div>{{ value }}</div>
{% endfor %}
{% if loop.index0 is even %}
<div class="xyz">Div 1</div>
{% else %}
<div class="xyz">Div 2</div>
{% endif %}
{% endfor %}
Now I want to display alternating contents in the second extra div, something like:
{% for values in items|batch(4) %}
{% for value in values %}
<div>{{ value }}</div>
{% endfor %}
{% if loop.index0 is even %}
<div class="xyz">Div 1</div>
{% else %}
{% first appearance show: %}<div class="xyz">Div 2</div>
{% then show: %}<div class="xyz">Div 3</div>
{% endif %}
{% endfor %}
Is it possible?