How do I get a list of child pages of /teams to create an admin blueprint for a user to create an event? (pick Home team and Visiting team for a game)
I can create a 'select' with options
team-select-away:
type: select
label: Visiting Team
options:
option1: "Team 1"
option2: "Team 2"
I want the options to be populated from all child pages that exist under /teams.
team-select-home:
type: select
label: Home Team
options:
- ''
data-options@:
I can populate options from:
data-options@: '\Grav\Common\Page\Pages::types'
I cannot populate options from:
data-options@: ['\Grav\Common\Page\Pages::children', '/teams']
data-options@: ['\Grav\Common\Page\Pages::getCollection', '/teams']
data-options@:
'@page.children': '/teams'
I know the field works as I've set it up. I just can't seem to figure out the YAML syntax for 'get all children of /teams and populate them in a select list.'