Zawartość pomocy dla wersji :

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.

Creating a Content Fragment

The method of creating a content fragment is (basically) the same for both simple and structured fragments:

  1. Navigate to the Assets folder where you want to create the fragment.

  2. Select Create, then Content Fragment to open the wizard.

  3. The first step of the wizard requires you to specify the basis of the new fragment.

    • This can be a:
      • Template - for example Simple Fragment
      • Model - used to create a fragment that requires structured content; for example the Airport model
    • All available templates and models are displayed.

    After selection, use Next to proceed.

  4. In the Properties step specify:

    • Basic
      • Title
        The fragment title.
      • Description
      • Tags
    • Advanced
      • Name
        The name; will be used to form the URL.
        Mandatory; will be automatically derived from the title, but can be updated.
  5. Select Create to complete the action, then either Open the fragment for editing or return to the console with Done.

Actions for a Content Fragment

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
  • Manage Tags
  • To Collection
  • Copy/Paste
  • Move
  • Publish/Unpublish
  • Relate/Unrelate
  • Delete


Many of these are standard actions for Assets and/or the Desktop App.

Opening the Fragment Editor

To edit your fragment:

  1. Use the Assets console to navigate to the location of your content fragment.

  2. 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:



    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.

  3. Navigate through the three modes using the icons in the side panel:

  4. After making changes, use Save or Cancel as required.


    Both Save and Cancel will exit the editor - see Save, Cancel and Versions for full information on how both options operate for content fragments.

Save, Cancel and Versions

The editor has two options:

  • Save

    Will save the latest changes and exit the editor.


    It is possible to remain in the editor, making a series of changes, before selecting Save.


    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.

  • Cancel

    Will exit the editor without saving the latest changes.

While editing your content fragment AEM automatically creates versions to ensure that prior content can be restored if you Cancel your changes:

  1. 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:

    1. If the token is found, the fragment is considered to be part of the existing editing session.
    2. 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.
  2. While there is an active editing session, the content being edited is automatically saved every 600 seconds (default).


    The auto save interval is configurable using the /conf mechanism.

    Default value, see:


  3. If the user selects to Cancel the edit, the version created at the start of the editing session is restored and the token is removed to end the editing session.

  4. If the user selects to Save the edits, the updated elements/variations are persisted and the token is removed to end the editing session.

Editing the Content of your Fragment

The same editor is used for all fragments. However, there are some minor differences in the options available:

Rich Text Editor - Full Screen Mode


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:


From here, there is also:

  • A drop down selector to change between:


    If you select Plain Text you might lose any formatting, markdown and/or assets that you have inserted in either Rich Text or Markdown.

  • An action to show Text Statistics:

  • The option to close full-screen mode and return to the normal flow of the fragment editor.

Creating and Managing Variations within your Fragment


You cannot create additional variations for structured fragments (based on models).

Variations allow you to take the Master content and vary it according to purpose (if required).

Creating a Variation

To create a new variation:

  1. Open your fragment and ensure that the side panel is visible.

  2. Select Variations from the icon bar in the side panel.

  3. Select Create Variation.

  4. A dialog will open, specify the Title and Description for the new variation.

  5. Select Add; the fragment Master will be copied to the new variation, which is now open for editing


    When creating a new variation it is always Master that is copied, not the variation that is currently open.

Editing a Variation

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.

Renaming a Variation

To rename an existing variation:

  1. Open your fragment and select Variations from the side panel.
  2. Select the required variation.
  3. Select Rename from the Actions drop down.
  4. Enter the new Title and/or Description in the resulting dialog box.
  5. Confirm the Rename action.


You cannot rename Master.

This only affects the variation Title.

Deleting a Variation

To delete an existing variation:

  1. Open your fragment and select Variations from the side panel.
  2. Select the required variation.
  3. Select Delete from the Actions drop down.
  4. Confirm the Delete action in the dialog.


You cannot delete Master.

Synchronizing with 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.


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.

  1. Open your content fragment in the fragment editor. Ensure that the Master has been edited.

  2. Select a specific variation, then open it in full-screen mode.


    Synchronization is only available in full-screen mode.

  3. Select Sync with master.

  4. Master and the variation will be shown side-by-side.

  5. Select Synchronize, the variation will updated and shown. 

  6. You can now close full-screen mode and Save the fragment.

Associating Content with your Fragment

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.

Adding Associated Content


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:

  1. Open your fragment and select Associated Content from the side panel.

  2. Select Associate Content or Associate Collection (as appropriate, depending on whether any collections have already been associated or not).

  3. Select the required collection.



    During this step you can optionally add the fragment itself to the selected collection; this aids tracking. 

  4. Confirm (with the check mark). The collection will be listed as associated.


Editing Associated Content

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.

Viewing and Editing the Metadata of your Fragment

Editing Properties / Meta data

You can view and edit the metadata (properties) for content fragments:

  1. In the Assets console navigate to the location of the content fragment.

  2. Either:

  3. The Basic tab provides options that you can view or edit:

    • Thumbnail, for which you can Upload Image
    • Title
    • Description
    • Tags
    • Created (display only)

Publishing and Referencing a Fragment


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 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.

Deleting a Content Fragment

To delete a fragment:

  1. In the Assets console navigate to the location of the content fragment.

  2. Select the fragment.


    The Delete action is not available as a quick action.

  3. Select Delete from the toolbar.

  4. Confirm the Delete action.


    If the fragment is already referenced in a page you will then see a warning message and be required to confirm that you want to proceed with a Force Delete. The fragment, together with its content fragment component, will be deleted from any content pages.

Using your Content Fragment on a Page


To use structured fragments (based on a content model), ensure that you have installed the appropriate core component. See the Installation Instructions.


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.

Adding a Content Fragment to Your Page


This example is based on the new core components. 

  1. Open your page for editing.

  2. Add the appropriate Content Fragment component; from either the Components browser or Insert New Component.

  3. Open the Configure dialog for the component.

    Specific the:

    • Content Fragment to be referenced; the selector will allow you to browse to the location.
    • Add any Elements to be displayed or leave empty to show all elements.
  4. Save the settings, using the checkmark. The required elements, from the selected fragment will be shown.


Further Page Authoring Actions with Content Fragments

See the existing AEM 6.3 documentation for further information about authoring with Content Fragments:

Related Documentation