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
- From the Windows Start menu (or from the Tools menu of the Content Manager Explorer), open Template Builder.
Note: If Template Builder is running, close any open Template (save changes, if needed).
- Click New Compound Template to create a new Compound Template.
- 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.
- Drag the Add to Experience Optimization Template Building Block into your Experience Optimization Component Template, as in the following illustration:
- Run the Compound Template: select Debug > Run then choose a Component to run the Compound Template against.
- Click Save.
- Make the Compound Component Template dynamic with the following steps:
- In Content Manager Explorer, open the Component Template.
- From the Component Presentations based on this Component Template will be list, select Published as a Dynamic Component, as shown in the following illustration:
- Add Schemas to define the structure of Experience Optimization promotional content with the following steps:
- In Content Manager Explorer, open the Component Template.
- Select the Linked Schema tab.
- Add Schemas, defining Experience Optimization promotional content, to the list of Allowed Schemas.
- 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.