Using Experience Fragments covers the following topics:
- Using Experience Fragments in AEM Screens
- Propagating Changes from the Master Page
An Experience Fragment is a group of one or more components including content and layout that can be referenced within pages. Experience fragments can contain any component, such as, one or multiple components that can contain anything within a paragraph system, that will be referenced into the complete experience or requested by a third endpoint.
To learn more about Experience Fragments, click here.
The following example uses We.Retail as a demo project from where the Experience Fragment is leveraged from a Sites page to an AEM Screens project.
As an example, the following workflow demonstrates the use of experience fragments from We.Retail in Sites. You can choose a web page and leverage that content in your AEM Screens channel on one of your projects.
Creating a demo project with a Channel
Creating a Project
- Click Screens and select Create --> Create Project to create a new project.
- Select Screens from the Create Screens Project wizard.
- Enter the Title as DemoProject.
- Click Create.
Creating a Channel
- Navigate to the DemoProject you created and select the Channels folder.
- Click Create from the action bar (see the figure below). A wizard will open.
- Choose the Sequence Channel and click Next.
- Enter the Title as TestChannel and click Create.
Navigate to a Sites page in We.Retail
- Navigate to Sites and select We.Retail -> United States ->English and select Equipment page to use this as an experience fragment for your Screens channel.
- Click Edit from the action bar to open the page you want to use as an experience fragment for your Screens channel.
Creating Live Copy of Experience Fragment
- Navigate to the AEM home page.
- Select Experience Fragments and highlight the ScreensFragment and click Variation as live- Copy, as shown in the figure below:
Using Experience Fragment in Screens Channel
- Navigate to the Screens channel where you want to use the Screens fragment.
- Select the TestChannel and click Edit from the bar.
- Click the components icon from the side tab.
- Drag and drop the Embedded Page to your channel.
e. Select the Embedded Page component and select the top left (wrench) icon to open the Page dialog box.
f. Select the Screens live copy of the fragment you created in Step 3 in the Path field.
After completion of precceeding steps, you can validate your experience fragment in the TestChannel by:
- Navigating to the TestChannel.
- Selecting the Preview from the action bar.
Live Copy refers to the copy (of the source), maintained by synchronization actions as defined by the rollout configurations.
Since the Experience Fragment, we created is a live copy from the Sites pages, so if you make changes to that particluar fragment from the master page, you will view the changes in your channel or the destination where you have used the Experience Fragment.
For more information on Live Copy, see Reusing Content: Multi Site Manager and Live Copy.
Follow the steps below to confirm the changes in your channel:
- Navigate to the Screens -> Channels -> TestChannel.
- Click Preview from the action bar to confirm the changes.