Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

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

Avatar

Level 3

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

7 Replies

Avatar

Employee

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

Avatar

Community Advisor

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)



Arun Patidar

Avatar

Level 3

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.

Avatar

Correct answer by
Community Advisor

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.

Avatar

Community Advisor

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?



Arun Patidar

Avatar

Former Community Member

Looks like you are describing static templates. Use editable templates.

Avatar

Level 3

Thanks, I will look into this now