Configure a snippet

Current version: 1.8

Snippets enable content editors to work more efficiently by reusing predefined sets of renderings on site pages. You can specify the behavior of snippets reuse in the Content Editor. For example, whether you allow content editors to duplicate and change the snippet locally.

To edit a snippet:

  1. Navigate to the Data folder of the site, right-click Snippet, and click Snippet Item.

  2. In the Datasource configuration section, in the Global data source selection behavior field, select one of the following options:

    • Do not copy – The default setting. The snippet uses a globally assigned data source. The source of the content is in the site data folder. When you reuse this snippet on different pages and then change it, all instances of the snippet on all pages are updated automatically.

    • Copy global data source to local context upon selection – A copy of the snippet, its configuration, and content are added to the page. Changes made to the snippet are only applied for that specific page.

    • Ask user whether the copy of global data source to local context is required upon selection – This option allows the content editor to choose how to reuse the snippet and displays the following message in the Experience Editor:

      Do you want to copy this data source?
Note

If you do not see the Datasourceconfiguration section, you must add the Global Datasource Behavior template to the snippet item. To do this, navigate to the Templates folder and go to Feature/Composite/Datasource/Snippet/Snippet Item and in the Data section add the Global Datasource Behavior template (/sitecore/system/Settings/Foundation/Experience Accelerator/Local Datasources/Enums/Datasource Selection Behavior).

Do you have some feedback for us?

If you have suggestions for improving this article,