Expand my Community achievements bar.

SOLVED

Custom Headers and Footers in Experience Fragments for Specific Pages (Document-Based Authoring in EDS)

Avatar

Level 2

I am currently using auto-generated Experience Fragments for the header and footer across multiple pages in AEM with document-based authoring (EDS). However, I need to apply different headers and footers for specific pages instead of using the same auto fragments everywhere. Is there a way to define custom Experience Fragments for the header and footer for certain pages while using document-based authoring? If so, what would be the best approach to achieve this?

1 Accepted Solution

Avatar

Correct answer by
Level 8

You can define the metadata for your page nav or footer with the value of the custom header fragment page.

narendiran_ravi_0-1742218775242.png

 

As you can see in boilerplate code -https://github.com/adobe/aem-boilerplate/blob/878dbbb7e4382c1b0ba6854442983c63bed51d1d/blocks/header...  and https://github.com/adobe/aem-boilerplate/blob/878dbbb7e4382c1b0ba6854442983c63bed51d1d/blocks/footer...  they are reading the metadata called nav or footer for header and footer respectively. 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 8

You can define the metadata for your page nav or footer with the value of the custom header fragment page.

narendiran_ravi_0-1742218775242.png

 

As you can see in boilerplate code -https://github.com/adobe/aem-boilerplate/blob/878dbbb7e4382c1b0ba6854442983c63bed51d1d/blocks/header...  and https://github.com/adobe/aem-boilerplate/blob/878dbbb7e4382c1b0ba6854442983c63bed51d1d/blocks/footer...  they are reading the metadata called nav or footer for header and footer respectively.