Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

Fixed blueprints for children of a page?

admin theme

Started by arman 5 years ago · 4 replies · 565 views
5 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,

5 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?

5 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. 🙂

5 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
5 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 Ton Haarmans, 5 years ago
13 1136 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 61 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 135 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 110 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 129 7 months ago