Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Fixed blueprints for children of a page?

admin theme

Started by arman 6 years ago · 4 replies · 826 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 Anna, 2 days ago
2 53 16 hours ago
Forms & Blueprints · by Anna, 3 days ago
7 82 16 hours ago
Forms & Blueprints · by Anna, 1 week ago
5 186 6 days ago
Forms & Blueprints · by TomW, 1 month ago
3 379 1 month ago
Forms & Blueprints · by Japhy, 2 months ago
2 595 2 months ago