ola
March 28, 2017, 12:24pm
1
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.
ola
March 28, 2017, 12:48pm
3
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.
ola
March 28, 2017, 1:13pm
5
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
Perry
December 29, 2017, 11:32am
6
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
the bluprint is in person
what I do wrong ?
texnixe
December 29, 2017, 12:03pm
7
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}}'