I have views with 6 results. However they are displayed in 2 different ways. 2 first in one way, 2 next in second way, next in first way and last in second way. I know it is quite confusing. I have found this solution: How to handle field with multiple items but I tried this without success. My output from this field is something like:
<a href="/dignissimos-velit" hreflang="en">Dignissimos velit</a>
I want to achieve something like that:
{% set items = output %}
{% for item in items %}
{% if loop.index <=2 %}
<h3 class="heading3 mb-xs">
{{ item }}
</h3>
{% endif %}
{% endfor %}
{% for item in items %}
{% if loop.index >= 3 and loop.index <= 4 %}
<h4 class="heading4 mb-xs">
{{ item }}
</h4>
{% endif %}
{% endfor %}
{% for item in items %}
{% if loop.index >= 5 and loop.index <= 6 %}
<h3 class="heading3 mb-xs">
{{ item }}
</h3>
{% endif %}
{% endfor %}
Maybe someone could help me with this? I would be very grateful. How iterate through output field?