---
title: Bonus: Reusing CF Across Web and Mobile
slug: saga-hol/bonus-reusing-cf-across-web-and-mobile
createdAt: 2026-08-20T13:43:41.846Z
---

*In this lab, you’ll create a Content Fragment in AEM, retrieve it with GraphQL, add it to a Saga webpage, and verify that the same content appears in the mobile app.*

:::hint{type="info"}
## Learning objectives

By the end of this lab, you will be able to:

- Create and publish a Content Fragment in AEM.
- Retrieve a Content Fragment using the AEM GraphQL editor.
- Reuse structured content across web and mobile channels.
- Verify that the website and mobile app display the same authored content.
:::



## Step 1 — Create a Content Fragment

1. In AEM, navigate to **Assets > Saga XWalk > Content Fragments**.

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/nSWjw_BLQeaG4SQLC7-1l_image.png" size="100" isUploading="false" width="1637" height="535" darkWidth="1637" darkHeight="535" showCaption="false" indent="1"}

2. Select **Create**, then choose the **CTA** Content Fragment Model.

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/fH0Up4-fNabTR8dEs667I_image.png" size="100" isUploading="false" width="1627" height="534" darkWidth="1627" darkHeight="534" showCaption="false" indent="1"}

3. Select **Next** and enter a title. Include your initials so you can distinguish your fragment from other participants’ entries.
4. Select **Done**, then open the new Content Fragment.
5. Complete the fields. The Content Fragment Model defines the fields and structure available in the fragment.

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/onDvIxmFQvNvVOkx-Tc2Q_image.png" size="100" isUploading="false" width="1451" height="789" darkWidth="1451" darkHeight="789" showCaption="false" indent="1"}

6. Save and publish the fragment, if publishing is available in your lab environment.



## Step 2 — Retrieve the fragment with GraphQL

*Content Fragments can be delivered as structured content through AEM GraphQL. This lets applications request content from an AEM endpoint.*

1. Open the AEM menu and select **Tools** (the hammer icon). Open **GraphQL Editor**.

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/8WBQo79GUmRpIqGZhCraq_image.png" size="100" isUploading="false" width="1434" height="845" darkWidth="1434" darkHeight="845" showCaption="false" indent="1"}

2. In the endpoint selector, choose **Ref Demo EDS** if it is the endpoint configured for the Saga lab. Otherwise, select the Saga endpoint specified for your environment.

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/wL8HndTzS0Mafiq2fT279_image.png" size="100" isUploading="false" width="641" height="135" darkWidth="641" darkHeight="135" showCaption="false" indent="1"}

3. Select the query that retrieves a Content Fragment by its path.
4. In the **Query Variables** panel, replace the example path with the path of the fragment you created:

:::BlockQuote{indent="1"}
\{
&#x20; "path": "/content/dam/saga-xwalk/content-fragment/\<your-fragment-name>",
&#x20; "variation": "main"
}
:::

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/DHNZAd940_U5uEn_Q-XxV_image.png" size="100" isUploading="false" width="1376" height="790" darkWidth="1376" darkHeight="790" showCaption="false" indent="1"}

5. Select **Run** (or the play button).

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/JY2vz1XxwKE9Y1iHc_zi4_image.png" size="100" isUploading="false" width="818" height="403" darkWidth="818" darkHeight="403" showCaption="false" indent="1"}

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/xhsXnVqgkXbUbKWXAE_u3_image.png" size="100" isUploading="false" width="1377" height="791" darkWidth="1377" darkHeight="791" showCaption="false" indent="1"}

6. Check that the response contains the values you entered in the Content Fragment.

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/gzVo-ef3uht3FbaQPRYdj_image.png" size="100" isUploading="false" width="1374" height="786" darkWidth="1374" darkHeight="786" showCaption="false" indent="1"}

:::hint{type="info"}
**Tip:** Use the fragment’s actual AEM path. If the response is empty, check the path, variation, endpoint, and publication status.
:::

Running the query confirms that the fragment can be retrieved through GraphQL. It does not, by itself, configure the webpage or mobile app to use that content.



## Step 3 — Add the fragment to a Saga webpage

1. Open a Saga webpage in the authoring workflow used for this lab.
2. Add a **Content Fragment** block to the page, preferably in a new section.
3. Configure the block to use the fragment you created.
4. Preview the page and confirm that the fragment’s content appears.
5. Publish the page if required by your lab workflow.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/dgv_hNZq8JxLqKXlptW3V_image.png)

You can experiment with the available presentation or styling options without changing the source content in the fragment.



## Step 4 — Verify the content in the mobile app

1. Install and open the mobile app used for the lab.

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/Wq8xZlClaaJuDXTLWCF9l_image.png" size="80" width="2378" height="1078" isUploading="false" darkWidth="2378" darkHeight="1078" showCaption="false" indent="1"}

2. Open the app’s **Settings** screen.
3. Enter the Saga **Program ID** and **Environment ID** assigned to your lab.

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/T10kQArbNl8NII2PCpBBe_image.png" size="40" isUploading="false" width="384" height="784" darkWidth="384" darkHeight="784" showCaption="false" indent="1"}

4. Select **Fetch**.
5. In the brand dropdown, select saga-xwalk or the equivalent Saga brand configured in your environment.
6. Select **Apply Configurations**.
7. Go to the app’s **Home** screen and locate the Content Fragment. Scroll down if needed.

::Image[]{src="https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/30pbTylE9A5uE9f39LRc4_image.png" size="40" isUploading="false" width="360" height="789" darkWidth="360" darkHeight="789" showCaption="false" indent="1"}

Confirm that the mobile app displays the content you authored in AEM.

:::hint{type="info"}
**If the fragment does not appear:&#x20;**&#x43;onfirm that the program, environment, and brand are correct; that the app is using the Saga environment; and that the fragment has been published.
:::



## Next steps

You can now go ahead and make changes in the CF i.e. in AEM CF editor UI and notice your changes in CF being propagated to your Web Page as well as Mobile App.

Here we have only 2 channels but in reality there could be *n* number of channels consuming the CF content originating from AEM.

**
