This is probably super easy, but I can’t figure it out, nor find a solution in the resources nor the forum.
How can I simply combine two queries into one in blueprints.
query: site.children.published
query: site.grandchildren.template("note").published
Do I need to create a Page Model, or is there an easier way?
samzzi
April 6, 2021, 11:45pm
2
You can query a collection where you merge the 2 query’s:
Collections: Collections | Kirby
(You can query a collection with query: kirby.collection('collectionname')
Merging collections: $pages->merge() | Kirby
Thanks a lot @samzzi
Since "notes" allready had a collection, this is how I worked it out:
query: kirby.collection("pages").add(kirby.collection("notes"))
Works like a charme, have a nice day
ktryn
October 24, 2021, 10:16pm
4
The solution I have been looking for