I am having issues with rendering my images through the structure field
Here is my blueprint:
fields:
archive:
label: Archive Structure
type: structure
columns:
image:
width: 3/5
fields:
image:
type: files
query: page.images
uploads: true
<?php
$items = $page->archive()->toStructure();
foreach ($items as $item): ?>
<div class="archive__item gc">
<p class="span-3"><?= $item->project()->html() ?></p>
<p class="span-3"><?= $item->type()->html() ?></p>
<p class="span-3"><?= $item->year()->html() ?></p>
<?php foreach ($item->images()->toFiles() as $image): ?>
<img class="span-3" src="<?= $image->crop(400)->url() ?>">
<?php endforeach ?>
</div>
<?php endforeach ?>
Any suggestions?