Hi everyone,
I’d like to show a page field or mutliselect field called “speakers” where i can pick from either a collection of pages (teachers) and kirby panel users (which extends Collection).
But neither $collection->add(); or $collection->append works.
Here is my code so far :
First the collection that should return both users and teachers
<?php
use Kirby\Cms\Users;
return function (Users $users) {
$teachers = collection('teachers');
$all = $users->add($teachers);
return $all;
};
And then, the yaml field:
speakers:
label: Speakers
type: pages
translate: false
required: false
icon: users
query: kirby.collection('speakers')
Thanks in advance