Creating an Experience Optimization-enabled Component Template

Before site editors can create new Components as dynamic, targeted content, you need Component Templates that are enabled for Experience Optimization.

About this task

You can easily create your own Experience Optimization-enabled Component Templates by creating copies of these templates and modifying them to your specific needs, for example, to use a custom Region View with a different layout.

The DXA Experience Optimization module includes the following sample Component Templates:

  • SmartTarget Article — used by schema-based Regions
  • Article [SmartTarget:Example1] and Article [SmartTarget:Example2] — two legacy Component Templates used by legacy template-based Regions

This task describes creating a new Component Template for schema-based Regions, therefore using the SmartTarget Article Component Template.

Procedure

  1. Go to your SDL Tridion Sites website, and open the Content Explorer.
  2. From the Content Manager pane, go to the following folder:
    PUBLICATION\Building Blocks\Modules\Experience Optimization\Editor\Templates
  3. Make a copy of the SmartTarget Article sample template, and open it for editing.
  4. On the General tab, modify the template's properties and metadata, as needed.
    Note that templates for use with Experience Optimization must have the following settings (already set for you if you copied the sample template):
    • The Allow on Page Using Dynamic Assembly checkbox is selected.
    • For the Component Presentations based on this Component Template will be: list, Published as a Dynamic Component is selected.
    • For the Metadata Schema list, Component Template Metadata is selected.
  5. Define the Entity View Name that will be used for all Components based on the template.

    The sample template uses the Article Entity View from DXA core.

  6. On the Linked Schemas tab, the Article and News Article schemas are already linked. You can add schemas or change schemas, as needed.
  7. Select Save and Close to commit your changes.