I have some page blueprints that define pages that should exist only once. For example the pages/search.yml
.
Because there should always be only one search page, I have set some options:
extends: pages/default
title: Search
icon: search
options:
delete: false
changeStatus: false
changeSlug: false
changeTemplate: false
move: false
create: false
duplicate: false
preview: false
...
These options ensure that the existing search page cannot be deleted and that a new one cannot be created.
In my site.yml
I have a pages
field that lists all existing pages:
pages:
label:
en: Pages
de: Seiten
type: pages
This list also includes the pages that are allowed to exist exactly once (like the search page) and that is exactly what is intended.
The problem now is that the search template is also in the selection field in the corresponding page creation dialog, but such a page cannot be created. So it doesn’t make sense for it to be selectable at all.
How can I prevent such page templates from being displayed in the select box? Is there any solution for this?
It’s not just about the search page but also about actual specific content pages. So splitting the list is not an option for me.