How to list all drafts of the whole site?

On the page “site.yml” I want to list all drafts, also from subpages. With this way I have an overview where drafts are still hiding. My code shows me that there are no drafts yet.

drafts:
  label: Drafts
  type: pages
  status: draft
  query: site.index.filterBy('status', 'draft')

Queries for section are not possible yet, will come in Kirby 4. You could use the Pagesdisplay plugin: GitHub - rasteiner/k3-pagesdisplay-section: K3 plugin: display any page list in a section. Any parent, many parents, filtered, don't care..

2 Likes

Thank you very much. The plugin is great.
This is how it worked:

type: pagesdisplay
query: site.children.drafts