Documentation Center

Creating a Compound Template to send content to OpenSearch

Component Templates turn Components into publishable content (Component Presentations). When sending content to OpenSearch, you need a dynamic Compound Component Template that uses the Add to Experience Optimization Template Building Block (TBB).

Before you begin

Prerequisites for this task are as follows:

  • Template Builder is installed.
  • You have Template Management rights.
  • You have write permissions for the Folder in which you intend to create the template.

Procedure

  1. From the Windows Start menu (or from the Tools menu of the Content Manager Explorer), open Template Builder.
  2. Click New Compound Template to create a new Compound Template.
  3. In the New Compound Template dialog:
    • Under Content Manager, specify the Content Manager in which you want to create this Compound Template by selecting, or typing, the URL of the Content Manager Explorer website.
    • Under Select Location, select a Publication and navigate to a Folder in that Publication in which you intend to create the Compound Template and select the Folder.
    • Under Name, enter a name for your Compound Template, for example SendToElasticsearch.
    • Under Type, select Component Template.
    • Click OK.
    The Template Builder creates and opens a New Compound Template of type Component Template.
  4. Drag the Add to Experience Optimization Template Building Block into your Experience Optimization Component Template, as in the following illustration:
  5. Run the Compound Template: select Debug > Run then choose a Component to run the Compound Template against.
  6. Click Save.
  7. Make the Compound Component Template dynamic with the following steps:
    1. In Content Manager Explorer, open the Component Template.
    2. From the Component Presentations based on this Component Template will be list, select Published as a Dynamic Component, as shown in the following illustration:
  8. Add Schemas to define the structure of Experience Optimization promotional content with the following steps:
    1. In Content Manager Explorer, open the Component Template.
    2. Select the Linked Schema tab.
    3. Add Schemas, defining Experience Optimization promotional content, to the list of Allowed Schemas.
  9. Click Save and Close.

Results

When users create and publish Components based on these Component Templates, Content Delivery sends the content items (Component Presentations) to OpenSearch.