Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Fixed blueprints for children of a page?

admin theme

Started by arman 6 years ago · 4 replies · 726 views
6 years ago

Hi !
I would like to know if it is possible to set a specific template for all the child pages of one page?
In other word, is it possible to automatically populate the "template" field (in the admin popup) when one add a new child page, depending on the parent page?

I found this , but my pages are too different to simply work with conditional fields.

Any clues?

Thanks a lot,

6 years ago

Your linked post might be a good start. I'm not at my machine right now, so can't test it, but could you add a similar condition and, if it matches, replace the default of template field?

6 years ago

Thanks you for your reply !

I will look further into this method, maybe using the import@ option for blueprints.

Could you just tell me what you mean by "the default of template field" ?
I haven't seen any mention of it in the blueprint documentation.

PS: I'm looking into that because I don't want clumsy users to get lost in the different templates of the website. Last resort I'll do a nice tutorial. 🙂

6 years ago

This is the field (in admin new page popup) you need to extend and change default to what you need. I didn't test how this should be done, but you can play around with condition and replace-default@

👍 1
last edited 03/24/21 by Karmalakas
6 years ago

That's very interesting thanks !
I'm going to work on that and post results here if it works.

Cheers

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Japhy, 1 week ago
2 200 2 hours ago
Forms & Blueprints · by FrViPofm, 4 weeks ago
5 313 4 weeks ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2304 8 months ago
Forms & Blueprints · by Hugo Oliveira, 9 months ago
0 765 9 months ago
Forms & Blueprints · by Flachy Joe, 10 months ago
9 847 10 months ago