How can apply a change to a template across the pages that use that template?

karlw37000147

11-07-2019

I have a template that is applied to multiple pages.

This template has an image on it so all the created pages have this image on it.

But now i want to change that image on the template so the change is applied across the pages that use the template.

It seems that once a page is created with a template, the template changes don't affect existing pages but do affect a new page.

My question is how would i make a change to the template so it applies to existing pages that use that template already?

Accepted Solutions (1)

Accepted Solutions (1)

Prince_Shivhare

12-07-2019

Did you tried editable template?

I am this should work because we are using it for header and footer. and whatever we are changing is changing in each pages.

Also, if you want to work with specific components, then you can use style-system in AEM 6.4.

for example, you can check V2 versions of core components.

Answers (6)

Answers (6)

Arun_Patidar

MVP

12-07-2019

Yes, if you will change the Structure of the templates, its content will be moved in initial content.

Structure of template you can change at any time.

Can you try with sample templates?

karlw37000147

12-07-2019

what is the best documentation to use for dynamic templates?

i get the impression from what ive seen that you cant really change pages that already use a dynamic template once they been built because its only the locked (or unlocked - sorry i've forgot which) components that can get edited so you cant change the initial content of a page once its been created. the only thing would be the structure.

but in a column layout, i cant add stuff to a component in a column because all it does is show a grey box in list with the components name on.

Arun_Patidar

MVP

11-07-2019

you might be using the static templates, dynamic templates helps to overcome this restriction.

To resolve your issue you can go with either of the solutions:

1. Write a utility which scans pages which were created using those templates and update the property(image)

2. Use design dialog to apply global template level changes

3. Convert static templates to dynamic templates(won't be straight forward)

hamidk92094312

Employee

11-07-2019

For editable templates after the new page is created a dynamic connection is maintained between the page and the template, this means that changes to the template structure will be reflected on any pages created with that template (changes to the initial content will not be reflected) [1].

Templates