Search code examples
adobeaemaem-6crx

Why should the header and footer in AEM be defined as experience fragment rather than making them a header or a footer component?


In AEM, I see that its good to make the header as an experience fragment that making it as a component. Any reasoning for that?


Solution

  • Both are valid. But the reason the Experience Fragment method is better comes down to a few things:

    1. Fewer components, reuse of existing components.
    2. Changes to the header and footer may be accomplished without the need for development
    3. The header and footer are self contained and could be queried for use outside of AEM if necessary.
    4. Experience Fragment variations allow you to create different header/footer options for various scenarios, but keep them in one place that is easy for authors to understand.