Hello so I have a cover image, and a gallery, I want to loop through the images on my page for the gallery, but exclude the cover photo.
This is my code
<?php foreach ($page->files() as $file) : ?> <?php if ($file->type() == 'image') : ?> <div class="col-2"> <a href="<?= $file->url() ?>" alt="<?= $page->title()->html() ?>" data-lightbox="gallery"> <img class="thumbnail" src="<?= $file->crop(200, 132)->url() ?>" alt="<?= $page->title()->html() ?>" /> </a> </div> <?php endif ?> <?php endforeach ?>
and this is how my blueprints are set up if that is any use?
cover: type: files headline: Cover layout: cards template: cover min: 1 max: 1 required: required gallery: type: files headline: Gallery template: image min: 0 max: 6
if anyone knows the easiest way to do this that would be great Thanks