Adobe Experience Manager (AEM) content fragments are created and managed as page-independent assets.
They let you create channel-neutral content, together with (possibly channel-specific) variations. You can then use these fragments, and their variations, when authoring your content pages.
Together with the updated JSON exporter, structured content fragments can also be used to deliver AEM content via Content Services to channels other than AEM pages.
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.
This page must be read with Working with Content Fragments (and related pages) because it introduces basic terminology and concepts, together with creating and managing fragments.
The content fragments enable:
Marketing and Campaign Strategy
Creative Pro
Copy Writers
Producers and Journey Managers
Open your page for editing.
Add the Content Fragment component; from either the Components browser or Insert New Component.
You can either:
Open the Assets browser and filter for Content Fragments (the default is Images). Then drag the required fragment onto the component instance.
Select the content fragment component, then Configure from the toolbar. In the dialog, you can open the selection dialog box to browse and select the required Content Fragment.
An alternative method is to drag a specific content fragment directly onto the page. This automatically creates the associated component (Content Fragment).
Initially the content from the Main Element and Master (variation) is shown. You can select other elements and/or variations as required.
For more information about further editing functionality, see the following:
* [Responsive Layout](/docs/experience-manager-65/authoring/siteandpage/responsive-layout.html?lang=en)
* [Editing Page Content](/docs/experience-manager-65/authoring/authoring/editing-content.html?lang=en)
Open the fragment’s Configuration dialog box so you can configure the fragment for use on the current page. The dialog can depend on the component used.
In the appropriate configuration dialog box, you can select the available parameters, including:
Content Fragment
Specify the fragment to be used.
Display Mode:
Single Text Element
Multiple Element
Element
The elements available depend on the template used.
Variation
Paragraphs: specify the range of paragraphs to include:
All
Range: for example, 1
, 3-5
, 9-*
Handle headings as their own paragraphs
You can open the fragment source for editing (the asset) using the Edit icon on the component toolbar. This lets you edit and manage the content fragment.
As always, editing the fragment source can impact all pages that reference that content fragment.
When a specific content fragment is added to the page, there is a Drag components here placeholder between each HTML paragraph (and at the top/bottom) of the fragment.
This lets you add extra content in-between (that is, in-between content) the fragment content (at any of the available points), without having to change the root fragment.
For in-between content you can:
The in-between content is page content. It is not stored in the content fragment.
You can also insert visual assets (images) to the fragment itself.
Visual assets inserted into the fragment itself are attached to the preceding paragraph in the fragment. This means that you cannot position in-between content between a visual asset and the preceding paragraph.
After you have added in-between content to a content fragment on your page, then changing the structure of the underlying content fragment (that is, in the content fragment editor) could lead to erroneous/unexpected results.
When this occurs, the in-between content is kept as is:
In-between components have an absolute position within the sequence of components in the fragment flow. This position does not change, even when the content of paragraphs in the fragment changes.
This can make it appear as if the relative positioning has changed, as in-between paragraphs have no contextual relationship to the (fragment) paragraphs they are positioned next to.
Unless the two paragraph structures conflict; in such a case, the in-between content is not displayed (although it is still present internally).
If you have associated content with the content fragment, these assets are available from the side panel (after you place your fragment on the content page). Associated content is effectively a special source of content for of in-between content.
There are various methods of adding visual assets (for example, images) to the fragment and/or page.
If you have multiple content fragments on the one page, the Associated Content tab shows assets appropriate to all fragments.
Once you have added a fragment with associated content to your page, a new tab (Associated Content) is opened in the side panel.
From here you can drag the assets to the required location (either to an existing component or to the required position where the appropriate component is created):
If assets (for example, images) have been inserted into the fragment itself, then the options for editing these assets in the page editor is limited.
For example, for an image you can
Other changes, such as move, copy, delete must be made in the fragment editor.
Fragments must be published so that they can be used on your published web pages: