Shorten the query language / query fetch: site.children

Hello dear kirby-community.
i am trying to shorten this query language… i am not sure if this is the right way…

i want to show the playlistcategory , without “category/” as shown above in the pic. i hope you understand…

playlistcategory:
            label: choose Category
            type: select
            width: 1/2
            options: query
            query:
              fetch: site.children.template("categories").children.template("category").listed
              text: "{{ page.categoryname }}"

HOW COULD I WRITE THE FETCH: Query shorter?
i hope this could solve my problem… thnx

Well, what you see there is the value that is stored, you are only defining the text to be shown in the select field.

However, you probably wouldn’t want to store anything but the complete path to the page.


On a side note: Please don’t use “guys”

1 Like