Templates Overview

Templates define how content is shown on your site

John Barton avatar
Written by John Barton
Updated over a week ago

When you create a campaign in PureClarity, you decide what content to show. This can be personalised recommendations, or other content you want to show to your users.

All this content is defined using templates. PureClarity comes with a wide range of templates to help you get started and you can create new ones yourself.

Templates are made up of 2 parts:

A template for the HTML that will be shown on your site. This uses a template language called Handlebars. When content is shown to a user, the template is rendered (converted) into HTML. CSS and JavaScript can also be part of this.

A schema which describes the properties of the template. This could be settings such as width, height, colour etc. When a campaign is created the schema defines what you can configure for the template. These properties are available for use in the HTML via Handlebars.

In summary:

When a campaign is shown the user, the template chosen for the campaign is rendered and HTML is produced that is shown to the user. This takes the settings set up in the campaign (defined by the schema) and the model for what is being rendered (such as the products to show in a recommender).

Template Editor Overview

The template editor lists all the custom templates you have set up in PureClarity. Click on a template and it will open in the editor.

For each template you can see how many campaigns are using it, and quickly duplicate/rename and save the template. You will not be able to delete a template if it is being used by a campaign.

You can add a new template by clicking, "Add New Template". You will then choose what template you want to base your template on. You can choose an empty template if you want to start building from scratch.

Did this answer your question?