Query multiple templates

#1

Hi,

I’m trying to fetch multiple templates in my site blueprint. I can see in reference how to do, and just work fine with 1 template, and try to adapt it with query language but no result :frowning:

My blueprint looks like this for the moment:

      cta:
        label: cta
        type: select
        options: query
        query: site.children.template("items")

Is it possible to fetch multiple templates?
thank you.

0 Likes

#2

The template method only accepts a single template. More complicated queries like

query: site.children.filterBy("template", "in" ,["note", "album"])

are currently not possible.

I’d use a custom collection for this purpose.

1 Like