Get your content from an XM data source

When adding dynamic data in a component, you can work with external data sources, or with XM data sources.

When using an XM data source in a component, you do not actually define a content item to be used to map data to the element, but instead you define a template for the data you want to insert in the Sitecore component. Later, once your component is staged and used in the page builder, you will assign the content item that is compatible with the template.

Add an XM data source in Components

To add an XM data source to your Components project:

  1. Go to the Content Editor.

  2. If needed, create a new template (for example, in Templates/Feature/...)

  3. In the left hand side pane, in the content tree, navigate to sitecore/Content/Site name/Site name/Settings.

  4. In the Site configuration section, in the FEAAS component data source templates, click the template(s) that you want to add to the Components builder so that they appear on the right hand side field.

    Click the templates in the Content Editor to make them available as data source in Components.
  5. Click Save.

  6. Go to Components, on the Data sources tab, you can see the new XM data source in the list of available data sources.

If you don't have any data items compatible with the template, Components produces placeholder data accessible inside the builder. For example, you will see a text in the component canvas saying "This is text" to indicate that the element has been mapped to an XM template.

If there are content items using that template, the one that has most content filled is shown.

Do you have some feedback for us?

If you have suggestions for improving this article,