---
title: "Assign a content item from a local data source"
slug: "assign-a-content-item-from-a-local-data-source"
abstract: "Components built in Content Editor or the Component builder app can include unassigned content items that you want to link to a local XM data source such as the Media library."
---
# Assign a content item from a local data source

In Page builder, Sitecore components contain unassigned content items that need to be linked to content items stored in local data sources, such as the Media library. This concerns some components, such as **Container** and **Rich Text**, or Sitecore components that have variables mapped with a template from an XM data source.

## Assign an existing content item

To assign a content item from a local data source to a component:

1. In Page builder, on the **Editor** tab, open the relevant page. In the editor view, click the relevant component.
2. In the right-hand pane of Page builder, click **Content**, then **Select item**.
3. In the **Assign content item** dialog, browse the content items tree to find the content item you want to assign to the component.
4. Click **Assign**.

## Create a new content item

If the content item you want to assign to the component does not exist yet, you can create a new one directly in the **Assign content item** dialog.

To create a new content item:

1. In Page builder, on the **Editor** tab, open the relevant page. In the editor view, click the relevant component.
2. In the right-hand pane of Page builder, click **Content**, then **Select item**.
3. In the **Assign content item** dialog, browse the content items tree to the position where you want to add a new content item, and click **Create new**.
4. Select a template for the content item. [Templates](https://doc.sitecore.com/xmc/en/developers/xm-cloud/en/data-templates.html) for content items are created and managed in the Content Editor.
5. Enter a name for the new content item.
6. Click **Assign**.