Hi Community
I make a Projects overview page. I took the base of the Portfolio example in the doc but with some modifications.
I’m trying to display multiple cover images per project. But here is the problem, I have several images which is displayed but it is the same which is repeated.
My Cover section in the project blueprint:
cover:
type: files
headline: Covers
layout: cards
info: "{{ file.dimensions }}"
template: cover
max: 4
<?php foreach ($page->children()->listed() as $project): ?>
<li>
<a href="<?= $project->url() ?>">
<?php foreach($project->images() as $image): ?>
<?= $project->images()->findBy("template", "cover") ?>
<?php endforeach ?>
<h1><?= $project->title() ?></h1>
</a>
</li>
<?php endforeach ?>
I also give you an image of the panel and one of the results:
Thanks for your help and sorry for my broken English