I know that a few other posts with this title exist, but none of them seemed to help me out.
I have currently the case that I create the “home” page with the default.yml blueprint.
Because home is a bit special, I would like to reassign it another template (home.yml) and change the default.yml for all other pages.
I tried to add
so I tried:
But this has no effect. The option is always greyed out. (To what is the name of the template option referring to? Is it the filename? Or is it the title? (Which has spaces in my case …)
I then read somewhere that the blueprint changeTemplate options only apply for child pages?!
So I tried adding this codeblock to site.yml. But no effect either.
So I am currently stuck and don’t really know how to solve this.
Also I have to mention that I use Kirby headless, so I don’t mess around with templates.
Thank you in advance. Cheers
true will not work, but listing out the templates like in this example is correct. Could you please provide more context.
@texnixe I think the
home page is special in terms of
changeTemplate. At least I noticed this a few versions back in a project. It didn’t allow me to use
changeTemplate, no matter what I tried.
Thanks for the replies.
You ask for more context, but I don’t know what else I can give you there :)…
@thguenther I tried to make a new blueprint (
archive.yml), created a new page with this template and also there I can’t select the
Change template option:
archive.yml looks like this:
label: Archive Entries
label: Exact name of the broadcast
label: Draggable Images
There is a lot of stuff in there that is not important in this matter, I left it in there anyway, for the whole context…
Also I have to mention that I am logged in with a user with Admin rights (unchanged, no admin.yml).
I think I must be missing something… right?
You indentation is not correct, should be
don’t know if that’s a copy paste issue?
No the indentation was indeed one off.
Fixing it does not help though.
Oh, hey, but @thguenther’s comment might be correct.
If I fix indentation on my archive.yml I do now have the option to change the template!
So it’ s just special on home then?
Yes, seems like that’s still the case — I just reproduced it.
If you change the home page in the
config.php it won’t work on that page either. So it doesn’t have anything to do with the uid
It probably makes sense the user doesn’t change the home template on 90% of websites. But it would undoubtedly be great if you could overwrite it somehow. What do you think, @texnixe?
I didn’t know that was a no-no. But yes, I can definitely see use cases for changing the home page template and don’t know why that shouldn’t be possible.