Prezeráte obsah pomocníka verzie:
- 6.3
- Staršie verzie
Content Fragments have been available since AEM 6.2. In both AEM 6.2 and AEM 6.3 these were limited to a (primarily) text-only format without a predefined structure.
With this feature pack there are now two types of content fragments:
- simple fragments (as previously)
These have no predefined structure. They contain only text, and images.
These are based on the Simple Fragment template. - fragments that contain structured content (new)
These are based on a Content Fragment Model, which predefines a structure for the resulting fragment.
These can also be used to realize Content Services using the JSON Exporter.
The method of creating a content fragment is (basically) the same for both simple and structured fragments:
In the Assets console a range of actions are available for your content fragments, either:
- From the toolbar; after selection of your fragment all appropriate actions are available.
- As quick actions; a subset of actions available for the individual fragment cards.

Select the fragment to reveal the toolbar with applicable actions:
- Create
- Download
- Save the fragment as a ZIP file; you can define whether to include Elements, Variations, Metadata.
- Checkout
- Properties
- Allows you to view and/or edit the fragment's metadata.
- Edit
- Allows you to open the fragment for editing content together with its elements, variations, associated content and metadata.
- Manage Tags
- To Collection
- Add the fragment to a collection.
- This can also be done when associating a collection with the fragment.
- Add the fragment to a collection.
- Copy/Paste
- Move
- Publish/Unpublish
- Relate/Unrelate
- Delete
Poznámka:
Many of these are standard actions for Assets and/or the Desktop App.
-
Open the fragment for editing, by either:
- Clicking/tapping on the fragment or fragment link (this is dependent on the console view).
- Selecting the fragment, then Edit from the toolbar.
The fragment editor will open:
Poznámka:
1. A message will be shown when the fragment is already referenced on a content page.
2. The side panel can be hidden/shown using the Toggle Side Panel icon.
-
Navigate through the three modes using the icons in the side panel:
- Variations: Editing the content and Managing your Variations
- Associated Content
- Metadata
-
Poznámka:
Both Save and Cancel will exit the editor - see Save, Cancel and Versions for full information on how both options operate for content fragments.
-
Poznámka:
It is possible to remain in the editor, making a series of changes, before selecting Save.
Výstraha:
In addition to simply saving your changes, Save also updates any references and ensures that the dispatcher is flushed as required. These changes can take time to process. Due to this, there can be a performance impact on a large/complex/heavily-loaded system.
Please bear this in mind when using Save and then quickly re-entering the fragment editor to make and save further changes.
While editing your content fragment AEM automatically creates versions to ensure that prior content can be restored if you Cancel your changes:
-
When a content fragment is opened for editing AEM checks for the existence of the cookie-based token that indicates whether an editing session exists:
- If the token is found, the fragment is considered to be part of the existing editing session.
- If the token is not available and the user starts editing content, a version is created and a token for this new editing session is sent to the client, where it is saved in a cookie.
The same editor is used for all fragments. However, there are some minor differences in the options available:
-
For simple fragments you can:
- Edit content; including use of the Rich Text Editor for multi-line text
- Create and manage variations
- Associate content
- View and edit metadata
-
For structured fragments you can:
- Edit content according to the data type; including use of the Rich Text Editor for multi-line text
- Associate content
- View and edit metadata
Poznámka:
See page authoring with the Rich Text Editor for full information about the options available.
For both fragment types, the Rich Text Editor is available in full-screen mode when editing multi-line text. For example:

-
A drop down selector to change between:
- Rich Text
- Markdown
- Plain Text
Výstraha:
If you select Plain Text you might lose any formatting, markdown and/or assets that you have inserted in either Rich Text or Markdown.
Výstraha:
You cannot create additional variations for structured fragments (based on models).
-
Select Add; the fragment Master will be copied to the new variation, which is now open for editing.
Poznámka:
When creating a new variation it is always Master that is copied, not the variation that is currently open.
You can make (basic) changes to the variation content after either:
- Creating your variation.
- Opening an existing variation; by opening Variations, then selecting the required variation from the side panel.

To rename an existing variation:
- Open your fragment and select Variations from the side panel.
- Select the required variation.
- Select Rename from the Actions drop down.
- Enter the new Title and/or Description in the resulting dialog box.
- Confirm the Rename action.
Poznámka:
You cannot rename Master.
This only affects the variation Title.
To delete an existing variation:
- Open your fragment and select Variations from the side panel.
- Select the required variation.
- Select Delete from the Actions drop down.
- Confirm the Delete action in the dialog.
Poznámka:
You cannot delete Master.
Master is an integral part of a content fragment and by definition it holds the master copy of the content, whereas the variations hold the individual updated and tailored versions of that content. When Master is updated it is possible that these changes are also relevent to the variations and, therefore, need to be propagated to them..
When editing a variation in full-screen mode you have access to the Sync with Master action. This allows you to automatically copy changes made to Master to the required variation.
Výstraha:
Synchronization is only available to copy changes from Master to the variation.
Transferring changes from a variation to Master is not available as an option.
Associated content provides the connection so that assets (i.e. images) can be (optionally) used with the fragment when it is added to a content page. This provides flexibility by providing a range of assets to access when using the content fragment on a page, while also helping to reduce the time required to search for the appropriate asset.
Poznámka:
There are various methods of adding visual assets (e.g. images) to the fragment and/or page.
To make the association you first need to add your media asset(s) to a collection. Once that is done you can:
Once you have associated a collection you can:
- Remove the association.
- Add Assets to the collection.
- Select an asset for further action.
- Edit the asset.
-
Either:
- Select View Properties to open the dialogs. Once open for viewing you can also edit.
- Open the content fragment for Edit, then select Metadata from the side panel.
Výstraha:
If your fragment is based on a model, then you ensure ensure that the model has been published.
Content Fragments must be published for use in a webpage in the publish enviroment. They can be published:
- After creation; from the Assets console.
- When you publish a page that uses the fragment; the fragment will be listed in the page references.
Výstraha:
After a fragment has been published and/or referenced, AEM will display a warning when an author opens the fragment for editing again. This is to warn that changes to the fragment will affect the referenced pages as well.
Výstraha:
To use structured fragments (based on a content model), ensure that you have installed the appropriate core component. See the Installation Instructions.
Poznámka:
After adding a structured fragment (based on a content model) to the page you can use it to provide Content Services when using the JSON Exporter.
Adobe Experience Manager (AEM) content fragments are created and managed as page-independent assets.
They allow you to create channel-neutral content, together with (possibly channel-specific) variations. You can then use these fragments, and their variations, when authoring your content pages.
Poznámka:
This example is based on the new core components.