Within Adobe Experience Manager as a Cloud Service, an Experience Fragment:
- is a group of one or more components
- includes both content and layout
- can be referenced within pages
- can contain any component
An Experience Fragment:
- Is a part of an experience (page).
- Can be used across multiple pages.
- Is based on a template (editable only) to define structure and components.
- Is made up of one or more components, with layout, in a paragraph system.
- Can contain other experience fragments.
- Can be combined with other components (including other Experience Fragments) to form a complete page (experience).
- Can have different variations, which may share content and/or components.
- Can be broken down into building blocks that can be used across multiple variations of the fragment.
You can use Experience Fragments:
- If an author wants to re-use parts (a fragment of an experience) of a page. Without Experience Fragments, the author would need to copy and paste that fragment. Creating and maintaining these copy/paste experiences is time-consuming and prone to user errors. Experience Fragments eliminate the need for copy/paste.
- To support the headless CMS use-case. Authors want to use AEM only for authoring but not for delivering to the customer. A third party system/touchpoint would consume that experience and then deliver to the end user.
Write access for experience fragments requires the user account to be registered in the group:
Please contact your system administrator if you are experiencing any issues.
When Should You Use Experience Fragments?
Experience Fragments should be used:
- Whenever you want to reuse experiences.
- Experiences that will be reused with same or similar content.
- When you use AEM as a content delivery platform for third parties.
- Any solution that wants to use AEM as the content delivery platform.
- Embedding content in third party touchpoints.
- If you have an Experience with different variations or renditions.
- Channel or context-specific variations.
- Experiences that make sense to group; for example a campaign with different experiences across channels.
- When you use Omnichannel Commerce.
- Sharing commerce-related content on social media channels at scale.
- Making touchpoints transactional.
Organizing your Experience Fragments
It is recommended to:
- use folders to organize your Experience Fragments,
Creating folders allows you to:
- create a meaningful structure for your Experience Fragments; for example, according to classificationIt is not necessary to align the structure of your Experience Fragments with the page structure of your site.
- You can use the template editor to create your own template.
The WKND project structures some Experience Fragments according to Contributors . The structure used also illustrates how other features, such as Multi Site Management (including language copies), can be used.
Creating and Configuring a Folder for your Experience Fragments
To create and configure a folder for your Experience Fragments it is recommended to:
It is also possible to configure the Allowed Templates for your instance , but this method is not recommended as the values can be overwritten upon upgrade.
Configure the Allowed Templates for your Folder
This is the recommended method for specifying the Allowed Templates , as the values will not be overwritten upon upgrade.
- Navigate to the required Experience Fragments folder.
- Select the folder, and then Properties .
- Specify the regular expression for retrieving the required templates in the Allowed Templates field.For example: /conf/(.*)/settings/wcm/templates/experience-fragment(.*)?See: http://localhost:4502/mnt/overlay/cq/experience-fragments/content/experience-fragments/folderproperties.html/content/experience-fragments/wknd
- Select Save and Close .
Configure the Allowed Templates for your Instance
It is not recommended to change the Allowed Templates by this method, as the templates specified can be overwritten upon upgrade.
Please use this dialog for information purposes only.
- Navigate to the required Experience Fragments console.
- Select Configuration options :
- Specify the required templates in the Configure Experience Fragments dialog:
- Select Save .
Creating an Experience Fragment
To create an Experience Fragment:
- Select Experience Fragments from the Global Navigation.
- Navigate to the required folder and select Create :
- Select Experience Fragment to open the Create Experience Fragment wizard.Select the required Template , then Next :
- Enter the Properties for your Experience Fragment .A Title is mandatory. If the Name is left blank it will be derived from the Title .
- Click Create .A message will be displayed. Select:
- Done to return to the console
- Open to open the fragment editor
Editing your Experience Fragment
The Experience Fragment Editor offers you similar capabilities to the normal page editor.
See Editing Page Content for more information on how to use the page editor.
The following example procedure illustrates how to create a teaser for a product:
- Drag and drop the required component from the Components Browser .
- Depending on the component:
- Add any content and/or assets as required.
- Configure the properties as required.
- Add more components as required.
For example: http://<host>:<port>/editor.html/content/experience-fragments/wknd/language-masters/en/contributors/stacey-roswells/master.html
Creating An Experience Fragment Variation
You can create variations of your Experience Fragment, depending on your needs:
- Open your fragment for editing .
- Open the Variations tab.
- Create allows you to create:
- Variation as live-copy .
- Define the required properties:
- Name - if left blank it will be derived from the Title
- Variation tags
- Confirm with Done , the new variation will be shown in the panel.
Using your Experience Fragment
You can now use your Experience Fragment when authoring your pages:
- Open any page for editing.
- Create an instance of the Experience Fragment component, within the page paragraph system:
- Add the actual Experience Fragment to the component instance; either:
Edit, in the component toolbar, operates as a shortcut to open the fragment in the fragment editor.
- Drag the required fragment from the Assets Browser and drop onto the component.
- Select Configure from the component toolbar and specify the fragment to use, confirm with Done .
For example: http://<host>:<port>/editor.html/content/wknd/language-masters/en/about-us.html
You can select one or more components to create a building block for recycling within your fragment:
Creating a Building Block
To create a new Building Block:
- In the Experience Fragment editor, select the components you want to re-use:
- From the components toolbar, select Convert to building block :
- Enter the name of the Building Block , and confirm with Convert :
- The Building Block will be shown in the left tab ( Local ), and can be selected for further action:
Managing a Building Block
Your building block is visible in the Building Blocks tab. For each block, the following actions are available:
- Go to master : open the master variation in a new tab
Using a Building Block
You can drag your building block to the paragraph system of any fragment, as with any component.
When editing an Experience Fragment available Building Blocks are displayed in the left-hanf tab. You can filter according to:
- Local - Building Blocks from the current Experience Fragment
- All - Building Blocks from all fragments
Details of your Experience Fragment
Details of your fragment can be seen:
- Navigate to the location of your Experience Fragments (do not navigate further down to the variations within the fragment). Details are shown in all views of the Experience Fragments console, with the List View including details of an export to Target:
- When you open the Properties of the Experience Fragment:The properties are available in various tabs:These tabs are shown when you open Properties from the Experience Fragments console.If you Open Properties when editing an Experience Fragment, the appropriate Page Properties are shown.
- Title - mandatory
- Total number of variants - information only
- Number of web variants - information only
- Number of non-web variants - information only
- Number of pages using this fragment - information only
- Cloud Services
- Cloud Configuration
- Cloud Service Configurations
- Facebook page ID
- Pinterest board
- A list of references
- Social Media Status
- Details of social media variations
The Plain HTML Rendition
Using the .plain. selector in the URL, you can access the plain HTML rendition from the browser.
Although this is directly available from the browser, the primary purpose is to allow other applications (for example, third party web apps, custom mobile implementations) to access the content of the Experience Fragment directly, using only the URL .
Exporting Experience Fragments
By default, Experience Fragments are delivered in the HTML format. This can be used by both AEM and third party channels alike.
For export to Adobe Target, JSON can also be used. See Target Integration with Experience Fragments for full information.