How can I set a default template/blueprint to use when creating a new page?
Currently the Template field does not select any template at all:
How can I set a default template/blueprint to use when creating a new page?
Currently the Template field does not select any template at all:
You can set the templates to use in the blueprint of the parent page:
…
pages:
template:
- project
- article
- contact
…
The first template in the list will be used as the default template. You can, of course, just set one template.
If you want to set the template of the pages of the highest menu level, you have to add this, what @texnixe suggested, in the blueprint file “/site/blueprints/site.php
”!
@bastianallgeier and @distantnative:
Please add this in the docs of the panel, e.g. at Kirby docs > Panel > Blueprints > Templates for subpages
I think it is missing there.
Yes, you are right, this information is indeed missing. We’ll update the docs in the coming weeks to fill the gaps and add tutorials and stuff.
I think it may be useful to newbies of Kirby too, to add a pronounced hint e.g. at Kirby docs > Panel > Blueprints > Setting the blueprint title, this it is useful for editors and admins if they use the panel, that every blueprint has a bijective (in German: “eineindeutig”, I don’t know the best translation of this word) blueprint title!
@HeinerEF: please add missing doc items to this list, it get’s lost if it is all over the place Undocumented Kirby Features
I’d simply call this a unique title.
Ok, but for me this sounds in German only “eindeutig” (http://dict.leo.org), only one “ein”.
I think, who understands the two directions, gets a better realisation of this interrelationship.
I have found the first hint at:
I will add the other hint soon…
Hi!
I want to add a little reminder: Has this been added to the docs, yet?
Because I was searching for it and finally found it here.
Thanks!
This doesn’t apply to Kirby 3 I don’t think, but I can’t find any way to do the same thing. What’s the new way?
@tobystokes You can set a default template in a pages section, via the create
option (https://getkirby.com/docs/reference/panel/sections/pages#section-properties)
Thankyou @texnixe that’s what i was after!
Just to clarify though, because I really am sure this isn’t in the docs, this doesn’t appear to work if you are extending the pages preset.
i.e with a sections/projects.yml of:
type: pages
create: project
This works as pages/projects.yml:
title: Projects
sections:
all:
extends: sections/projects
headline: Featured
But this doesn’t:
title: Projects
preset: pages
all:
extends: sections/projects