Fetch ALL page children with select field

I’m using the select field to show a list of pages. The user is supposed to select a subpage from a top level page.

https://getkirby.com/docs/cheatsheet/panel-fields/select

According to the docs, I’m able to specify the parent page, and then specify children or grandchildren as the fetch option. The children option seems to only be direct children from the base page. Is there a way to select all page children, not only direct children or grandchildren?

Well, yes, children are only the direct subpages of the parent, not all descendants.

You could, however, use the controlled list plugin or create your own custom field.

Ok thanks. I created a feature request for this:

Oh, I just realized I overlooked the index option, so this is already possible but not documented, it seems.

Oh thanks!

Just to clarify for other readers, here is a sample blueprint field for a select field that lists all descendant pages from a parent page:

type: select
query:
  page: specify_your_parent_page_here
  fetch: index
1 Like

hello,

I have a problem to fetch all childrens of a page,
i tried this:

  video_language:
    label: Video language
    type: select
    options: 
    query:
      page: laender
      fetch: children
      value: '{{title}}'
      text: '{{title}}'

the structur is this

  • laender
    • 0-austria
      • person

the bluprint is in person

what I do wrong ?

You forgot to define query as options:

 video_language:
    label: Video language
    type: select
    options: query
    query:
      page: laender
      fetch: children
      value: '{{title}}'
      text: '{{title}}'

Oh! Yes thanks @texnixe