۶Ƶ

Content Fragments and Experience Fragments

۶Ƶ Experience Manager’s Content Fragments and Experience Fragments may seem similar on the surface, but each play key roles in different use cases. Learn how Content Fragments and Experience Fragments are similar, different, and when and how to use each.

Comparison

Content Fragments (CF)
Experience Fragments (XF)
Definition
  • Re-usable, presentation-agnostic content, composed of structured data elements (text, dates, references, etc.)
  • A re-usable, composite of one or more AEM Components defining content and presentation that forms an experience which makes sense on its own
Core Tenets
  • Content-centric
  • Defined by a structured, form-based, data model.
  • Design and layout agnostic.
  • The channel owns the presentation of the Content Fragment's content (layout and design)
  • Presentation-centric
  • Defined by unstructured composition of AEM Components
  • Defines design and layout of content
  • Used "as is" in channels
Technical details
  • Implemented as a cq:Page
  • Defined by Editable Templates
  • Native HTML rendition
Variations
  • The Master variation is the canonical variation
  • Variations are use-case specific, which may align with channels.
  • Variations are channel or context specific
  • Variations are kept in sync via AEM Live Copy
  • Building blocks allow content re-use across variations
Features
  • Variations
  • Variations as Live Copies
  • Versions
  • Building blocks
  • Annotations
  • Responsive layout and preview
  • Translation/localization
  • Complex data-model via Content Fragment references
  • In-app preview
Use
  • AEM Experience Fragment component for use in AEM Sites, AEM Screens or other Experience Fragments.
  • Export as Plain HTML for use by 3rd party systems
  • HTML export to ۶Ƶ Target for targeted offers
  • JSON export to ۶Ƶ Target for targeted offers
Common use cases
  • Powering headless use-cases over GraphQL
  • Structured data-entry/form-based content
  • Long-form editorial content (multi-line element)
  • Content managed outside the life cycle of the channels delivering it
  • Centralized management of multi-channel promotional collateral using per-channel variations.
  • Content re-used across multiple pages in a Web site.
  • Web site chrome (ex. header and footer)
  • An experience managed outside the life cycle of the channels delivering it
Documentation

Content Fragments architecture

The following diagram illustrates the overall architecture for AEM Content Fragments

Content Fragments architecture

  • Content Fragment Models define the elements (or fields) that define what content the Content Fragment may capture and expose.

  • The Content Fragment is an instance of a Content Fragment Model that represents a logical content entity.

  • Content Fragment variations adhere to the Content Fragment Model, however, have variations in content.

  • Content Fragments can be exposed/consumed by:

    • Using Content Fragments on AEM Sites (or AEM Screens) via the AEM WCM Core Components’ Content Fragment component.
    • Consume Content Fragment from headless apps using AEM Headless GraphQL APIs.
    • Exposing a Content Fragment variations content as JSON via AEM Content Services and API Pages for read-only use cases.
    • Directly exposing Content Fragment content (all variations) as JSON via direct calls to AEM Assets via the AEM Assets HTTP API for CRUD use cases.

Experience Fragments architecture

Experience Fragments architecture

  • Editable Templates, which in turn are defined by Editable Template Types and an AEM Page component implementation, define the allowed AEM Components that can be used to compose an Experience Fragment.

  • The Experience Fragment is an instance of an Editable Template that represents a logical experience.

  • Experience Fragment variations adhere to the Editable Template, however, have variations in experience (content and design).

  • Experience Fragments can be exposed/consumed by:

    • Using Experience Fragments on AEM Sites (or AEM Screens) via the AEM Experience Fragment component.
    • Exposing an Experience Fragment variations content as JSON (with embedded HTML) via AEM Content Services and API Pages.
    • Directly exposing an Experience Fragment variation as “Plain HTML”.
    • Exporting Experience Fragments to ۶Ƶ Target as either HTML or JSON offers.
    • AEM Sites natively supports HTML offers, however, JSON offers require custom development.

Supporting resource for Content Fragments

Supporting resource for Experience Fragments

recommendation-more-help
bb44cebf-d964-4e3c-b64e-ce882243fe4d