Hi,
I’m struggeling with my structure field.
In my Blueprint I have the following section:
relatedevents:
type: fields
fields:
relatedevents:
label: Related Events
type: structure
fields:
event:
label: Event
type: select
options:
type: query
query: site.children.find("program").children
text: "{{ page.title }}"
On my page I want the related page title like this:
<?php foreach($page->relatedEvents()->toStructure() as $event): ?>
<a href="<?= $event->page()->toUrl() ?>">
<button class="mt-4"><?= $event->event() ?></button>
</a>
<?php endforeach ?>
But in my text file it looks like this:
Relatedevents:
-
event: program/filmvorstellung
Every event.txt includes a Title: … and the panel looks just fine.
So what do I have to do to only get the page title for the event?
Thanks upfront!
Cheers
Alex