Get values from fields of multiple (child) pages

Let’s say I have a page and that has children that can have multiple authors assigned to each child. Is there a way to get all authors from all the pages?

I looked through the documentation but didn’t find something that would work. Of course, I could loop through all pages and generate a list of authors myself, but if there is a Kirby-native way to do it, that would be even greater!

:wave: Eric

PS: Slowly descending into Kirby for a few weeks now. Thanks for the excellent documentation and the generally friendly community.

1 Like

The pluck() method is your friend:

$authors = $page->children()->pluck('authors', ',');
1 Like

That’s almost too easy :smiley: Thanks!