This a follow up question to this one: How to pass a varaible between pages?
There is a collection
template with this blueprint:
items:
label: Items
type: structure
style: table
entry:
- item
fields:
item:
label: Item
type: select
options: query
query:
page: items
fetch: children
flip: true
In another template item
, I would like to retrieve the first collection
with a field item corresponding to the current page.
I tried something like:
<? $item = $page->uid() ?>
<?= $collection_default = page('collections')->children()->findBy('items', β¦)->first(); ?>
Is it possible to replace β¦
with something (like $items[$item]
) fetching this collection?