With Adobe Experience Manager (AEM), Content Fragments let you design, create, curate, and publish page-independent content. They let you prepare content ready for use in multiple locations/over multiple channels, ideal for headless delivery.
Content fragments contain structured content:
Content fragments can also be delivered in JSON format, using the Sling Model (JSON) export capabilities of AEM core components. This form of delivery:
This and the following pages cover the tasks for creating, configuring, maintaining, and using your content fragments:
The number of communication channels is increasing annually. Typically channels refer to the delivery mechanism, either as the:
However, you (probably) do not want to use the same content for all channels - you must optimize your content according to the specific channel.
Content fragments let you:
These content fragments can then be assembled to provide experiences over various channels.
Content Fragments and Experience Fragments are different features within AEM:
Content Fragments are editorial content that can be used to access structured data including texts, numbers, and dates, among others. They are pure content, with definition and structure, but without additional visual design and/or layout.
Experience Fragments are fully laid out content; a fragment of a web page.
Experience Fragments can contain content in the form of Content Fragments, but not the other way around.
For more information, see Understanding Content Fragments and Experience Fragments in AEM.
Before AEM 6.3, Content Fragments were created with the use of templates instead of models. Templates are no longer available for creating fragments, but any fragments created with such a template are still supported.
AEM Content Services are designed to generalize the description and delivery of content in/from AEM beyond a focus on web pages.
They provide the delivery of content to channels that are not traditional AEM web pages, using standardized methods that can be consumed by any client. These channels can include:
Delivery is made in JSON format using the JSON Exporter.
AEM Content Fragments can be used to describe and manage structured content. Structured content is defined in models that can contain various content types; including text, numerical data, boolean, date and time, and more.
Together with the JSON export capabilities of AEM core components, this structured content can then be used to deliver AEM content to channels other than AEM pages.
AEM also supports the translation of fragment content.
Content fragments are:
Stored as Assets:
Used in the page editor with the Content Fragment component (referencing component):
Accessible using the AEM GraphQL API.
Content Fragments are a content structure that:
To give authors more control of their content, images can be added to and/or integrated with a content fragment.
Assets can be used with a content fragment in several ways; each with its own advantages:
Insert Asset into a fragment (mixed-media fragments)
Visual assets inserted into the content fragment itself are attached to the preceding paragraph. When the fragment is added to a page, these assets are moved in relation to that paragraph when in-between content is added.
Associated Content
Assets available from the Assets browser of the page editor
The content fragment assets are made up of the following parts (either directly or indirectly):
Fragment Elements
Fragment Paragraphs
Assets Inserted into a Fragment (Mixed-Media Fragments)
Assets (images) inserted into the actual fragment and used as the internal content of a fragment.
Are embedded in the paragraph system of the fragment.
Can be formatted when the fragment is used/referenced on a page.
Can only be added to, deleted from, or moved within, a fragment using the fragment editor. These actions cannot be made in the page editor.
Can only be added to, deleted from, or moved within, a fragment using the Rich Text format in the fragment editor.
Can only be added to multi-line text elements (any fragment type).
Are attached to the preceding text (paragraph).
Assets can be (inadvertently) removed from a fragment by switching to Plain Text format.
Assets can also be added as additional (in-between) content when using a fragment on a page; using either Associated Content or assets from the Assets browser.
Associated Content
This is content external to, but with editorial relevance for, a fragment. Typically images, videos, or other fragments.
The individual assets within the collection are available to be used with the fragment in the page editor, when it is added to a page. This means that they are optional, depending on the requirements of the specific channel.
The assets are associated to fragments via collections; associated collections allow the author to decide which assets to use when they are authoring the page.
Optionally you can also add the fragment itself to a collection to aid tracking.
Fragment Metadata
Use the Assets metadata schemas.
Tags can be created when you:
Create and author the fragment
Or later:
Metadata processing profiles do not apply to Content Fragments.
Master
A part of the fragment
Master is accessible in the fragment editor under Variations.
Master is not a variation as such, but is the basis of all variations.
Variations
In-between content:
The in-between content is page content. It is not stored in the content fragment.
To create content fragments, consider the following:
Content Model
To use your Content Fragments for page authoring, you also need:
Content Fragment Component
A fragment, with its elements and variations, can be used to create coherent content for multiple channels. When designing your fragment, you must consider what is used and where it is used.