# Creating and managing custom templates


There are four controls for managing templates, to the right of the Using Template dropdown, which you will see when you are looking at an individual record.

  • Edit allows you to edit the basic properties of the current template
  • Clone makes a copy of the current template that can be edited
  • Delete deletes the current template
  • Add allows you to create a new template from scratch

When creating or editing a custom template, you should have a rich record open, of the type that you are creating a new template for. For eg, if you are creating a new object template, choose a rich object record with lots of data.

Editing an existing template or adding a new template brings up a pop-up.

The basic properties of a new template are Title, Endpoint, and Rules.

  • The Title is the name of your template as it will appear in lists.
  • The default endpoint is ‘all endpoints’ and should only be changed if you need to restrict the template to a particular endpoint.
  • The rules are entered in a further popup which requests two values: Path and Match Pattern.

For the path, you will typically choose @datatype.base. This can be found by typing an @ and using autocomplete.

For the match pattern you need to replace the text between the caret (^) and the dollar ($) in the text

^match_this_value$

You will typically enter

^object$

for an item record or

^agent$

for an organisational record

and then click Add. If you’re familiar with regular expressions, you can use one here.

In the rules section of the lower popup you will then see a rule that looks something like

@datatype.base = ^object$

You can then choose either to save an empty template, or to autogenerate a template.

An autogenerated template looks at the data in all records of the current type (eg an agent) and creates a template best suited to display the data of the record that you have open. It might need some adjustment once it’s created.

An empty template allows you to add, structure and edit the appearance of the fields in your data from scratch.