With Adobe Experience Manager (AEM) as a Cloud Service, Content Fragments allow you to design, create, curate, and publish page-independent content. They allow you to prepare content ready for use in multiple locations, and over multiple channels, ideal for headless delivery, and page authoring.
Content Fragments can be accessed from two consoles: Content Fragments and Assets.
There are also two editors available for Content Fragments. (Both editors are accessible from both consoles.)
This section deals with the Content Fragments console and the new Content Fragment editor. These have been developed for headless content delivery (though they can be used for all scenarios)
For further information see:
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:
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 exact same content for all channels - you need to optimize your content according to the specific channel.
Content fragments allow you to:
These Content Fragments can then be assembled to provide experiences over a variety of channels.
Content Fragments and Experience Fragments are different features within AEM:
Experience Fragments can contain content in the form of Content Fragments, but not the other way around.
For further information, see Understanding Content Fragments and Experience Fragments in AEM.
This and the following pages cover the tasks for creating, configuring, maintaining, and using your Content Fragments:
After the fragments have been created, you can:
Variations are a significant feature of AEM’s Content Fragments. They allow you to create and edit copies of the Main content for use on specific channels, and scenarios, making headless content delivery and page authoring even more flexible.
Main
Main is not a variation as such, but is the basis of all variations.
An integral part of the fragment
Main is accessible in the fragment editor under Variations.
In the editor available from the Assets console, Main is labeled as Master.
Variations
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 a variety of 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.
See Headless and AEM for an introduction to Headless Development for AEM Sites as a Cloud Service.
AEM also supports the translation of fragment content. See Translating Assets for further information.
Content fragments are:
A Sites feature.
Stored as Assets:
Accessible for content delivery using the AEM GraphQL API.
Available in the page editor by using the Content Fragment component (referencing component):
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:
The Content Fragment assets are made up of the following parts (either directly or indirectly):
Fragment Elements
Fragment Paragraphs
Blocks of text, often multi line, that are delimited as individual entities.
Enable content control during page authoring.
Fragment Metadata
Use the Assets metadata schemas.
Tags can be created when you:
Metadata processing profiles do not apply to Content Fragments.
A Content Fragment Model can often define data fields named Title and Description. If these two fields exist, they are user-defined fields and can be updated in the content area of the editor.
The Content Fragment, and its variations, also has metadata (property) fields called Title and Description. These two metadata fields are an integral part of any Content Fragment, and variation, and initially defined when the fragment is created. They can be updated in the properties/metadata area of the editor.
To create Content Fragments you need:
Content Model
To use your Content Fragments for headless content delivery you also need:
a GraphQL query to request the required content
this content can then be used for developing your own SPAs for AEM; for more information, review the following documents:
To use your Content Fragments for page authoring you also need:
A 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 need to consider what will be used, and where.
The WKND Site and WKND Shared samples are provided to help you learn about AEM as a Cloud Service.
The WKND project includes:
Content Fragment Models available under:
.../libs/dam/cfm/models/console/content/models.html/conf/wknd
.../ui#/aem/libs/dam/cfm/models/console/content/models.html/conf/wknd-shared
Content Fragments (and other content) available under:
.../assets.html/content/dam/wknd/en