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

content re usability in child pages

Avatar

Level 2

hi,

i have created header footer components using html and java.

how should i inherit all content to child pages from parent page.

i have added components in templates so that it will be visible in all pages, but content is not getting copied in sub pages.

kindly help for the same.

entire content is coming from java slightly based so i can not use inherited page properties.

1 Accepted Solution

Avatar

Correct answer by
Administrator

Way of doing this is:

1. Use Experience Fragments to create the header and footer and include those as initial content on your template types. That ways the authors can edit the XFs and the change will get reflected everywhere. You’ll have to figure out a caching strategy to make sure all the appropriate flush happens.

2. Best practice to add common header is :- Getting Started with AEM Sites Part 5 - Navigation



Kautuk Sahni

View solution in original post

2 Replies

Avatar

Correct answer by
Administrator

Way of doing this is:

1. Use Experience Fragments to create the header and footer and include those as initial content on your template types. That ways the authors can edit the XFs and the change will get reflected everywhere. You’ll have to figure out a caching strategy to make sure all the appropriate flush happens.

2. Best practice to add common header is :- Getting Started with AEM Sites Part 5 - Navigation



Kautuk Sahni

Avatar

Level 10

Apart from what is already mentioned by kautuksahni ,

1. You can use -Apache httpd Tutorial: Introduction to Server Side Includes - Apache HTTP Server Version 2.4 - One good way but setup might take time. Can be cached and flushed on specific changes, not all pages

2. Iparsys component in aem which would inherit node of parent page.- Once you make any changes to header/footer you need to flush entire child hierarchy to reflect changes in child pages

3. Reference component - same at 2