On “news” pages, I can select a related movie with a Pages field named “movie”, stored as uuids as I use Kirby 3.8
On each “movie” page I want to list news about it. How do I query them with uuids?
I tried page("news")->children()->filterBy( 'movie', $page->uuid() )
but it doesn’t return anything. What is the right way to achieve this in 3.8?
$news = page("news")->children()->filterBy( 'movie', $page->uuid(), '-' );
or
$news = page("news")->children()->filter(fn ($child) => $child->movie()->toPages()->has($page));
1 Like
Ah, I forgot the separator as Pages is a multiple value field!
Thank you @texnixe !