I have a particular template which is allowed to have subpages, but only certain subpages.
I have:
title: Section
pages:
template:
- module.box-list
- module.box-content
- module.box-ekomi
- module.box-image-button
- module.box-image-full
- module.box-image-small
- module.box-rechner
However, in the panel, when I go to add a subpage, all of the allowed templates from site.yml are shown as well. How can I prevent that from happening?
Could you provide some more information, please. What is your structure? Where is that section blueprint used? Subpages of a page that use the this section template should only get to choose from these module blueprints, there is no other option you could set.
Here’s some more of my setup:
site.yml:
title: Site
pages: true
template:
- default
- plain
- nocontainer
- blank
- topmenu
files: true
fields:
default.yml:
title: Default
pages: true
template:
- default
- module.accordion
- module.advantage-list
- module.button
- module.headline
- module.section
So, the home page is using the default template.
Inside this template, I can add various sub Pages/modules (using the module plugin), one of those modules is the section module. In this section module, I can add various box elements. (That’s the yaml from the first post).
Could this be because I’m using the modules plugin? Does pages: true need to be there if I’m specifying the templates?
I have to look into this. I first thought it was due to using true in addition to the templates, but that doesn’t seem to be the case (so, yes, you can remove true and just add the templates to allow subpages). It shouldn’t be caused by the modules plugin either.
As always, thanks for your quick response and effort!
Hi just following up to see if you were able to uncover anything.
Thanks,
m.
I can’t reproduce this but maybe there is something wrong with your section template, please check your indentation in your original file.
Hi Sonja,
Just wanted you to know, I think it was a YAML problem in one of the blueprints.
Somehow over time this problem corrected itself.