Restrict pages section to exclude a template

Ahoy!
I want editors to create first-level footer pages easily.
I have the site.yml blueprint split into the following sections:

  • Drafts
  • Unlisted
  • Listed
  • Footer-page (any status, should not appear above)

In order to have the pages of type template in the last section, I use

footer:
  headline: footer page
  help: Will only be shown in the footer navigation
  type: pages
  template: footer

Simple enough.

For the other three I want to allow and show anything except the template: footer type. I currently list every other template manually like so:

templates:
  - default
  - anotherTemplate
  - ohLookAtMeIAmATemplateYayVeryCool

as I couldn’t find a more elegant solution using queries by myself. So here’s my cry for human help:
Does anyone know a template: page.notTemplate("footer") that works?

Thanks in advance!

This is not possible yet.

There’s a feature request here that you might want to upvote:

However, if you define your section once in /site/blueprints/sections, you can then reuse it in all three instances and don’t have to retype everything.

An example of this can be seen in the Starterkit.

To come back to this topic:

How can I exclude pages or templates from a menu?

I tried this, the problem is that only the first template is excluded, not the following ones.

->notTemplate('pager-footer', 'pager-title-text-related', 'pager-title-text-image-listing')

Well I found thanks to the documentation:

->notTemplate(['one', 'two'])

->notTemplate(['pager-footer', 'pager-title-text-related', 'pager-title-text-image-listing', 'pager-title-text-image'])

Possible since Kirby 4.0 via templatesIgnore :+1: