How can i display a value of query in structure field?
My blueprint looks like this:
sammlung:
label: sammlung
type: structure
fields:
bild:
label: Bild
type: select
required: true
options: query
query:
page: bibliothek/werke
fetch: children
value: '{{title}} {{image}}'
text: '{{title}}'
My code like this:
<?php foreach ($page->sammlung()->toStructure() as $bild): ?>
<li class="showcase-item column">
<a href="<?= $bild->image()->url() ?>" >
<img class="immy" src="<?= $thumb->url() ?>"/>
<div class="buname">
<?= $bild->title()->html() ?>
</div>
<div class="bu">
<?= ($p = $bild->kuenstler()->toPage())? $p->title(): ''?>
</div>
</a>
</li>
<?php endforeach ?>