Panel pages list from two templates and different paths

I created a blog with different categories and subcategories. Some categories only have pages and other have subcategories then pages. I call a category a folder.
For example, I have 1_travel/cityguide/2019042_article/article.php (category and subcategory) and 2_lifestyle/20190305_article/article.php (just a category).
There’re also two different templates for the articles: first as seen before (article) and another like this: 1_travel/roadtrip/20181031_article/article-video.php (article-video).

I want to display a list of the articles on the root of my panel and to be able to create a new article or article-video that I can set on any (sub)category.

I tried many options like

parent: kirby.index.templates("article", "article-video")


query: site.index.templates("article", "article-video") 


query: site.index.filterBy("template", "in", ["article", "article-video"])


I also created a collection

// collections/articles.php
return function ($site) {
    return $site->children()->index()->filterBy('template', 'in', ['article', 'article-video']);

and then

query: site.collection("articles")

but nothing works, either the list is empty or an error appears.

I tried the plugin pagesdisplay but here all pages from the site folder are displayed, not the ones I want.

I don’t understand exactly how collections work and I think I didn’t use it properly. Maybe you can help me in that direction? Or maybe the answer is completely different, I’m a bit lost.


It is important to understand that a pages section can only ever have a single parent page.

This code, however, returns a collection, not a single page.

Also, there is no query property for pages sections (that is only possible with the PagesDisplay plugin (but then you can’t add new subpages, or if you modify to be able to create pages as well, you would have to set a parent to upload to, which wouldn’t make sense with your article structure).