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/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 exactly the 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 also Understanding Content Fragments and Experience Fragments in AEM.
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.
AEM also supports the translation of fragment content. See Translating Assets for further information.
Content fragments are:
Stored as Assets:
Used in the page editor by means of the Content Fragment component (referencing component):
Accessible using the AEM GraphQL API.
Content Fragments are a content structure that:
Are without layout or design (some text formatting is possible in Rich Text mode).
Contain one, or more, constituent parts.
Can use in-between content when referenced on a page.
Are independent from the delivery mechanism (i.e. page, channel).
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 advantage(s):
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.
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):
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 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.
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.
Use the Assets metadata schemas.
Tags can be created when you:
Create and author the fragment
Metadata processing profiles do not apply to Content Fragments.
An integral 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.
The in-between content is page content. It is not stored in the content fragment.
To create content fragments you need:
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 need to consider what will be used where.
The WKND Site samples are provided to help you learn about AEM as a Cloud Service.
The WKND project includes:
Content Fragment Models available under:
Content Fragments (and other content) available under: