An Experience Fragment is a group of one or more components including content and layout that can be referenced within pages. They can contain any component.
An Experience Fragment:
You can use Experience Fragments:
Write access for experience fragments requires the user account to be registered in the group:
experience-fragments-editors
Contact your system administrator if you are experiencing any issues.
Experience Fragments should be used:
Whenever you want to reuse experiences.
When you use AEM as a content delivery platform for third parties.
If you have an Experience with different variations or renditions.
When you use Omnichannel Commerce.
It is recommended to:
use folders to organize your Experience Fragments,
Creating folders lets you:
create a meaningful structure for your Experience Fragments; for example, according to classification
It is not necessary to align the structure of your Experience Fragments with the page structure of your site.
allocate the allowed templates at the folder level
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.
See:
http://localhost:4502/aem/experience-fragments.html/content/experience-fragments/wknd/language-masters/en/contributors/kumar-selveraj/master
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.
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
See Templates for Experience Fragments for further details.
Select Save and Close.
It is not recommended to change the Allowed Templates by this method, as the templates specified can be overwritten upon upgrade.
Use this dialog box for information purposes only.
Navigate to the required Experience Fragments console.
Select Configuration options:
Specify the required templates in the Configure Experience Fragments dialog:
See Templates for Experience Fragments for further details.
Select Save.
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.
Tags from the Experience Fragment template will not be merged with tags on this Experience Fragment root page.
These are completely separate.
Click Create.
A message will be displayed. Select:
Done to return to the console
Open to open the fragment editor
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 a Teaser from the Components Browser.
Select Configure from the component toolbar.
Add the Asset and define the Properties as required.
Confirm the definitions with Done (tick icon).
Add more components as required.
You can create variations of your Experience Fragment, depending on your needs:
Open your fragment for editing.
Open the Variations tab.
Create lets you create:
Define the required properties:
Confirm with Done (tick icon), the new variation is shown in the panel:
You can now use your Experience Fragment when authoring your pages:
Open any page for editing.
For example: https://localhost:4502/editor.html/content/we-retail/language-masters/en/products/men.html
Create an instance of the Experience Fragment component, by dragging the component from the Components browser to 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.
You can select one or more components to create a building block for recycling within your fragment:
To create a 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 is shown in the tab, and can be selected in the paragraph system:
Your building block is visible in the Building Blocks tab. For each block, the following actions are available:
You can drag your building block to the paragraph system of any fragment, as with any component.
Details of your fragment can be seen:
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.
Basic
Title - mandatory
Description
Tags
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
References
Social Media Status
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.
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.