Hey there, i’m kind of confused. I’m about to set up a onepager homepage for a little start-up company. I made my sections and am now putting them into snippets just as suggested in the tutorial. Since many fields of the onepager have to be updated by the users (such as locations in a map, news, meals and images, etc.) i now want to create blueprints according to the page structure i build like was told in the tutorial. I wonder how i can do this, since you have no choice for blueprints on first-level pages, only for subpages of them (where i can choose the blueprints…)
The site.php blueprint of the starter kit limits the allowed templates for first level pages to default. You can change that and either just set pages to true or define the templates that you want to allow:
<?php if(!defined('KIRBY')) exit ?>
title: Site
pages: true
fields:
title:
label: Title
type: text
It made me wonder if we can use comments in Blueprints. The answer is yes, as blueprints use YAML:
title: Home
pages: false # Limits template choice in the Panel to "default" one only.
fields:
title:
label: Title # This comment is not part of the label text.
Idea for @bastianallgeier and the team: adding a few comments in the Starterkit’s blueprints to make it a bit more didactic. This very blueprint choice topic seems to be a recurring issue among new Kirby users –I believe I’ve seen it asked multiple times in this forum in the last few days– and would be a good candidate for such a comment.