Templates

Templates are used to customize both the content and format of notifications and reports. Templates can be generic and designed for a large number of notifications, or they can be specially designed to format the content of one specific item. You can create any number of templates.

Templates can take the form of either HTML or plain text documents and can contain images and links to other web pages as well as content that is dynamically created by the system. Although this document describes using HTML templates, usage of plain text templates is the same.

You must upload templates to the Smart Notification repository before they can be used. The system uses its copy of the uploaded template, not the original file.

Note: If you modify the original template on your computer you must upload the new version to replace the template that is stored by the system.

Whenever a template is specified in a notification, you can select the type of delivery device. This allows you, for a single notification, to create custom templates for specific devices. Default templates are provided for each type of device, so if you do not specify a template, Smart Notification uses the appropriate default template.

Template tokens

Templates contain special tokens specific to the system. The tokens allow you to position and format many of the attributes of a notification. These tokens are replaced with dynamic content created by the system whenever content is generated using the template.

Text or HTML outside of these tokens is not modified during the merging of the dynamic content. Templates support cascading style sheets, allowing you to specify the formatting, fonts, font sizes, foreground and background colors etc.

Master templates

You can have more than one master template. Master templates are optional.

Master templates allow you to define the static parts of a template, typically the header and the footer, in one place. You can then reuse the master template as you create more specialized templates.

The master template can use any of the template tags that are available, but must include the [content] tag. This specifies where the content from the other templates is embedded in the master template when notifications are generated.