Hello, it seems it a too long time I did not play with Kirby…
I try to fetch the title and the url of a page selected in a structure. I can have or the title, or the url but both not…
For the moment blueprint and template lokk that this
test Blueprint:
selectproject:
label: select project
type: structure
style: table
entry:
- projectlink
fields:
projectlink:
label: project
type: select
options: query
query:
page: projects
fetch: children
text: '{{title}}'
value: '{{url}}'
projectdesc:
label: description
type: textarea
test template:
<?php foreach($page->selectproject()->toStructure() as $item): ?>
<?= $item->projectdesc() ?>
<br>
<a href="<?= url($item->projectlink()) ?>"> ?Project title? </a>
<?php endforeach ?>
There are a lot of topic about this, but I was not able to find a solution.
Thank you for your advices.