I have an Asset field where the first image is used as a big 'feature' and then the rest are used as support further down the page.
When I add .limit(1) to the for loop for the 'feature' image it effects the for loop further down the page by also only showing 1 image.
This is my code...
{% set entries = craft.entries.section('abstractionProjects').type('abstractionProjects').all() %}
{% for projectPanels in entries %}
Some HTML...
{% for asset in projectPanels.projectImages.limit(1) %}
<img src="{{ asset.url }}" alt="{{ asset.title }}">
{% endfor %}
Some HTML.....
More HTML...
{% for thumbs in projectPanels.projectImages.offset(1) %}
<div>
<img src="{{ thumbs.url('projectPageThumbs') }}" alt="{{ thumbs.title }}">
<a href="{{ thumbs.url('projectPageFullSize') }}" class="gallery"></a>
</div>
{% endfor %}
More HTML...
{% endfor %}
If I remove the .limit(1) from the first loop all the images are shown in both loops :/
Help appreciated
Thanks
projectPanels.projectImages.first()
orprojectPanels.projectImages[0]
to access the first item.<img src="{{ projectPanels.projectImages[0].url }}" alt="{{ projectPanels.projectImages[0].title }}">