Limiting available child templates in blueprints

Hi there,

after trying Grav I’m digging into kirby which I like a lot because of its simplicity.
I try to build the following scenario. Unfortunately the docs aren’t much help.

So: I’ve created a blueprint called “Staff” which works really fine.
Now I have a page called team which should be visible in the navigation but in the panel it should NOT be able to choose that blueprint.
Also the staff is a subpage of team.

Is it possible? Can you give my a hint where to look?

If your team page is a first level page, than the site.php blueprint would be the place to define all possible blueprints for the first level pages and exclude the staff blueprint.

For crying out loud!

template not templateS.
I tried that for hours. :blush:

Thanks a lot @texnixe.

Well, the problem is that if it is a first level page and you limit the possible template(s) to one, then all other first level pages can only have that one template as well and that would not make sense in most cases. You can only define/limit templates for subpages, not for a page itself … the page does not know in advance what sort of page it is supposed to be.

Edit: To achieve what you want, you would have to make the team pages the child of another page, which would make sense if there are supposed to be multiple team pages.

I guess in my usecase it is what I want:

  • I have a number of 1st level pages nobody should be able to edit. For example features, tour, team, legal stuff.
  • Each of this pages has a custom subpage. For example
    • team has members
    • features has feature-sets
    • legal stuff has TOS, imprint and privacy.

The first-level-pages are build from the subpages. Each in a different way so I have different templates.

Of course you have to create a subpage from the page-panel. So kirby knows what subpage and blueprint it has to use. I can live with that.

I’m afraid I don’t see your problem, then. If you define the top level pages in advance anyway, you don’t have to limit the blueprints, because you choose them in advance for the respective pages and no-one is going to touch them.

And in your team blueprint you define the possible blueprint/template for members, in features for feature-sets on so on.

Yes. The only problem was, that I used in blueprintes/site.php the word templateS. With capital S. But it should been template with no S. And I couldn’t figure out what the problem. Then I took another look and found the problem :smile: