Page 1 of 1
How to propogate template from parent page to child
Posted: Wed Jan 23, 2008 1:08 am
by drew
Hi everyone,
Other than 'manually' applying a template to each page, is there some other way to force all 'existing' child pages to inherit the template used by parent page?
Just thought someone might have an easy solution. Search results turned up nothing.
Thanks for your help, Drew
Re: How to propogate template from parent page to child
Posted: Sun May 18, 2008 3:08 am
by TQ_designs
I searched for information on this topic as well, but your unanswered post was the only one mentioning it
If there isn't a way to do this in the current version, will it be added in v2.0?
Re: How to propogate template from parent page to child
Posted: Sun May 18, 2008 6:12 am
by Dr.CSS
You can go to Layout ยป Templates and click default at one of the templates you want all new pages to use or click the 'Set All Pages' link which will make all pages have the same template...
Re: How to propogate template from parent page to child
Posted: Sun May 18, 2008 4:20 pm
by TQ_designs
If you want to change the template for every page in your site, that would be a perfect solution...but what I'm thinking of is a situation where you need different templates for certain sections. In this case, what would be ideal is some kind of checkbox that says "Apply parent template to all children".
Perhaps it's already on the roadmap for v2.0

Re: How to propogate template from parent page to child
Posted: Sun May 18, 2008 4:26 pm
by Nullig
When you're creating the page, you can just select the appropriate template from the dropdown.
Nullig
Re: How to propogate template from parent page to child
Posted: Sun May 18, 2008 4:32 pm
by TQ_designs
True, but I was speaking of a case where you have an existing hierachy (e.g. parent with 10 child pages) and want to change the template for all of them at once (instead of having to change it manually for each child, which could be time-consuming and result in one accidentally being missed).
Re: How to propogate template from parent page to child
Posted: Sun May 18, 2008 5:29 pm
by alby
TQ_designs wrote:
True, but I was speaking of a case where you have an existing hierachy (e.g. parent with 10 child pages) and want to change the template for all of them at once (instead of having to change it manually for each child, which could be time-consuming and result in one accidentally being missed).
No automatic tool.
You can update with SQL query (no recursive hierarchy):
UPDATE [db_prefix]content SET template_id =X WHERE parent_id = Y
Alby