Sitecore Experience Accelerator

Select, modify, and create a data source

Abstract

Select a data source for the rendering.

Most SXA renderings are designed for reusability and pull data from data source items or associated content. The content they display is not bound to the page on which they appear but is stored in data source items. When you add a rendering to a page, you can select an existing data source or create a new data source item. This gives you full control over the content architecture, naming conventions, and the level of reusability that you want.

This topic outlines how to:

When you add a reusable rendering to the page in the Experience Editor, the items available for selection depend on the rendering you selected, which prevents you from associating data source items that do not match the rendering's requirements.

Note

You cannot select associated content for the following renderings: non-reusable renderings (such as Rich Text), renderings that are shared across the entire site (Login), renderings that display data from the current page (Page Content), and renderings that do not display any content (Divider).

To select associated content:

  1. In the Experience Editor, from the Toolbox, drag a rendering that supports reusable content to the page.

  2. In the Select the Associated Content dialog box, you have the following options to choose from:

    Tab

    Path

    Description

    Select Existing Content

    Click an item

    Click an item from a global or local folder directly and then click OK.

    84D5071DA63E4E24B4A8846E63777295.png

    Rendering name (Current Site) Create

    Adds and selects a new data source that you can use globally.

    Click Rendering name (Current Site) and click Create. In the Insert item dialog box, click the place in the tree where you want to create the new data source, enter a name, and click OK.

    Optionally, you can create a new folder for your data source.

    B8F19259E44744479EFCB6C514AD817A.png

    Rendering name (Current Site) Copy to

    Creates a copy of a data source.

    Select the root item Rendering name (Current Site) and click Copy to copy the new data source. Select the place in the tree where you want to add a copy of the data source, enter a name for the copy, and click OK.

    A78FFF8F120545199ECF54649471FBDF.png

    Data (Current Site) Create

    Adds and selects a new data source that you can use locally.

    Click Data (Current Site) and click Create. Enter a name for the new data source and click OK.

    84C04EF3135C4DFEB23A8BA76B2143BE.png

    If you create the data source under the Page Data node it will be a local data source that is stored as a subitem of the page item. Any changes you make to local data sources will only affect the page you are working on. If you want to be able to reuse the data source and manage it globally, you must create the data source in the global folder.

    Data (Current Site) Copy to

    Creates a copy of a data source that you can use locally. Select the root item, enter a name for the copy, and then click OK.

    DA122E4452F44248944BD9097070C588.png

    Page

    Lets you use a page as a data source.

    This option is available for renderings that take content from the current page such as Page Content, Page List, JSON content, and JSON list.

    Search for Content

    In the Search field, enter the keywords that characterize the items that you want to search for, or build a query.

You might want to change an associated item after it is placed on a page. For example, if you need to replace an image on the page.

To modify associated content:

  1. In the Experience Editor, on the rendering's floating toolbar, click Change associated content.

    A164237BF0C24E04A642312DD74687FF.png
  2. In the Select the Associated Content dialog box, select the item that you want to associate with the rendering and click OK.