How to use query language?

Hi,

first of all: is there a good example how to use query language?
i only found this Query Language | Kirby CMS
and in these examples are no folders.

How do i know what’s in the site and page object? is there a way to display the whole object in yaml?

Here is my problem:
The screenshot is from the blogpost blueprint.
When i’m looking for the “rma” folder it is working, but i’m trying to find the blog template without using the hardcoded way.
I tried several ways (as you can see in Line 38-40), but it wasn’t working. I always get an error in the panel or the options are empty.

  articleCategory:
    label:
      en: Category
      de: Kategorie
    type: select
    max: 1
    options: query
    query: page.parent.parent.find("rma").blogCategories.split
#    query: page.parent.parent.filterBy("template", "blog").blogCategories.split
#    query: page.parent.parent.template("blog").children.blogCategories.split
#    query: site.children.listed.template("blog").blogCategories.split

Thanks in advance for your support.

Best regards,
Stefan

somehow i can only get the titles of the content files.

query: page.parent.siblings.template(‘blog’)
returns only the title, i can’t get other fields.
How can i get the blogCategories field?

Please post some more context.

More about the query language here: Query Language | Kirby CMS

Hi texnixe,

we have multiple blogs on our site. On the screenshot it is only the “5_rma” folder, but there are more to come.
In the blog.de.txt i have a field “Blogcategories” which i want to use as option in the panel.
The blogcategories are filled in the panel and look like this “Blogcategories: cat1, cat2, cat3”.

All blogposts (articles) are stored in the blogposts folder, so we can use one blogpost for multiple blogs.
You can see the blogpost.de.txt in the “1_blog-post01” folder.