Select query for multiple pages

Hello. Is is possible to query multiple pages using the select field? So for example I have a blog and case studies section. Can I setup a select so the user can select a child from one of those specific sections?

No, you can only query one page at a time. You could, however, set up a dynamic query using a JSON API,

Thanks for the quick reply. I actually opted for the ‘page’ field in this case, but let me ask a related question why we’re on this topic. This JSON option seems pretty bad a**. So I can manually or dynamically (using Kirby’s API) create a JSON file, then I would include the URL to that JSON file when setting up a select field? The select field would then pull the data from the JSON file?

It would only make sense if the options are dynamic, otherwise you could just manually list all the pages as options. But yes, you can manually or dynamically create that JSON file (dynamically, using a hook), put the URL to the file in the query field and then the data is read from that file.

Right. Thanks for sharing your knowledge.

You are welcome :slight_smile:

Wait… hook? Hmmm… Can you point me to a resource where I can read how to do that?


And there are also quite a few examples here in the forum, just use the search at the top.

Very helpful. Thanks again.