Change blueprint in Panel

Hey guys,

i loved Kirby 2 for being so easy to handle with a nice documentation but i have many problems with Kirby 3 :frowning:

How is it possible to change the blueprint in the panel under options for each page?
Example: for quick testing i created a cases page in the panel wie the template/blueprint ā€œSimple Pageā€ which has the .yml ā€œdefaultā€. Later i created ā€œcases.ymlā€ which contains my custom blueprint code for my cases page. But when i try to change the template/blueprint for the cases page from default.yml to cases.yml in the panel, it wonā€™t let me. The option is just disabled and i canā€™t activate it. Does someone know a solution?

This is controlled via the blueprint options:

https://getkirby.com/docs/reference/panel/blueprints/page#options, in this case the changeBlueprintoption.

If it is set to false, you canā€™t change the template.

Do you mean the changeTemplate option? Because there is no changeBlueprint option :confused:
I couldnā€™t change the blueprints neither in the starterkit-master nor in the plainkit-master. Iā€™ve read the documentation before and it says, that changing blueprints is always on true except it is set to false. I did not set anything to false manually!
ā€œor list of allowed templateā€ maybe i have to allow something explicit?

I have a cases.yml, cases.php (template) and a cases.php (snippet, because i build a one pager). What more do i need to allow to change blueprints via the panel?

Thanks so far!

Oh, sorry, I meant changeTemplate, of course.

Iā€™ll check and get back to you.

1 Like

No problem!
Thanks! :slight_smile:

As far as I can see, you canā€™t change the template by default. I tested with the about.yml in the Starterkit and adding:

options:
  changeTemplate: 
    - home

allowed me to change the template to home. Note that the accepted values are false or a list of allowed templates, there is no true option.

Okay, so i have to explicitly allow templates in the .yml, if i want to change them for the respective pages. In my opinion quite a bit laborious but iā€™m glad, that i now know how it works :slight_smile: thanks! Maybe for a future update it is a better option to give it a true statement? I think kirby 2 had a true statement? :thinking:

I donā€™t really remember, but I think changing templates can result in data loss, so the developer should really take care of only allowing templates that are compatible. Thatā€™s probably why a true option doesnā€™t exist.

1 Like