Adding or modifying template tokens
Use the information in this section to add or modify template tokens.
Templates contain special tokens specific to the system. 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 such as fonts, font sizes, foreground and background colors.
This table shows the tokens that you can use in your templates. Tokens are case sensitive.
Token | Description |
---|---|
[cell]
|
Returns the data from within a cell of one of the data tables in
the notification. You must specify the table, row, and column of the cell. The first
row of a table is the column headers. For example, |
[content] |
This token is used by master templates to specify where the body of the templates that use this master template should be embedded when notifications are generated. |
[datasetdescription] |
The description of the InfoSet or InfoSets from which the content is loaded. |
[description]
|
The description of the notification. |
[files] |
A list of links for the content. The links are those specified by application links for the InfoSets. |
[group] |
The homepage group of the notification. |
[if] , [else] ,
[endif]
|
These tokens are used to indicate a conditional section of the
template. These tokens allow part of the template to be included only if the
conditions that you specify are met. Consider the following:
The following example will only include the logo if this notification is being generated for delivery:
The following example will generate one set of content if tables 1, 2, and 3 are empty, and another set of content if any of them have any rows of data.
The following example will generate the same content as example 2 but uses OR instead of AND.
|
[instructions] |
The instructions for the notification. Instructions appear near the top of the notification and instruct a user on why the notification was sent, what it contains, and how the recipient should use it and take action on it. |
[link]
|
A list of links for the content. The links are those chosen using the auto-relate feature. |
[links]
|
A list of links for the content. The links are those chosen using the auto-relate feature, or are specified by application links for the InfoSets. |
[name]
|
The name of the notification. |
[owner] |
The owner of the notification. |
[path] |
The URL to the web context of the system. You can use this token
to create links to images and other files that can be displayed by web browsers and
email clients. For a single installation of the system, this token does not have to be used because you can hard code URLs in the templates. If the web context (URL) of the system is likely to change, or you want to create templates that are used at more than one installation, this token can be used to create templates that will not need modification between sites. The system replaces this token with a URL and should be placed, for instance, within HTML IMG tags. For example, |
[renderer=object] or
|
The system can pass data to other applications, enabling them to
render content which is then included in a notification. For example, sales
information could be passed to a mapping application which would draw a color coded
map based on the data that would be included in the notification sent out by the
server. The Rendering objects may be provided with the system. The same rules
that apply to |
[reply-to]
|
The reply to email address associated with the notification.
This is the email address that the system uses when a user selects the email reply
option. When you include the reply to in the template rather than the notification, you can make the reply to address conditional. For example, you can use the email address or user ID from a data column, you could specify conditions to select different templates that have different reply to email addresses, or you could use conditions in the data to select a specific reply to email address from a group of email addresses. This approach is useful if you are using notifications that are delivered using bursting. This
example shows how to specify the reply to address: The following example shows how to use an email address that is located in a data table in the notification. This example takes data (the email address) from the first data row of the fourth column of the first table. [reply-to=[cell?table=1&row=2&column=4]]
The following example shows how to use a user ID that is located in a data table in the notification. This example takes data (a user ID) from the first data row of the fourth column of the first table and appends "xyz.com" to create the email address. [reply-to=[cell?table=1&row=2&column=6]@xyz.com]
The following example shows how to use conditions. This example sets a reply to address of fred@xyz.com if the first condition in the notification is true and barney@xyz.com if the condition is not true.
|
[rowcount] |
Returns the number of rows in one of the data tables in the
notification. You must specify to which table you are referring. For
example, |
[systemname] |
The name of the system as provided on the System
Settings page. For example, XYZ Corp. Notification System. |
[template] |
This token is used to select a template. The template is used to
prepare the content for part or all of the notification. You can use this token to
conditionally load another template based on values in the data. You can use this token to specify the attachment type. All attachments are created as HTML, but you can use different type values to specify that application you want to use to open the attachments. For example:
Usually the data in the notification is different from the data in the attachment, so the template for the notification and the template for the attachment specify which tables to include. This token is processed last and can include any other token inside of it. Templates must be uniquely names. the system loads the new template and uses it to generate the notification content. If multiple templates exist with the same name, The system uses the first one it finds. If there is no template with this name, the system uses the original template to generate the notification. The following example loads a template called Invoice Past Due.
The following example specifies the template name and the attachment type. [template=Line Item Details&type=HTML]
The following example uses templates to display the notification's first table in the email. The second table is attached as a document that is opened by Excel.
|
[tool_delete]
|
A URL to a web page that allows the user delete the item. |
[tool_details] |
A URL to a web page that displays the online version of the notification. |
[tool_disable_next_month]
|
A URL to a web page that allows the user to disable a notification until the start of the next month. |
[tool_disable_next_qtr] |
A URL to a web page that allows the user to disable a notification until the start of the next quarter. |
[tool_disable_next_reset]
|
A URL to a web page that allows the user to disable a notification until the notification is no longer tripped. |
[tool_disable_next_week] |
A URL to a web page that allows the user to disable a notification until the start of the next week. |
[tool_disable_next_year] |
A URL to a web page that allows the user to disable a notification until the start of the next year. |
[tool_disable_permanent] |
A URL to a web page that allows the user to disable a notification. |
[tool_disable_days_1]
|
A URL to a web page that allows the user to disable a notification for 1 day. |
[tool_disable_days_2] |
A URL to a web page that allows the user to disable a notification for 2 days. |
[tool_disable_days_3] |
A URL to a web page that allows the user to disable a notification for 3 days. |
[tool_disable_days_4]
|
A URL to a web page that allows the user to disable a notification for 4 days. |
[tool_disable_days_5] |
A URL to a web page that allows the user to disable a notification for 5 days. |
[tool_disable_days_6]
|
A URL to a web page that allows the user to disable a notification for 6 days. |
[tool_disable_days_7] |
A URL to a web page that allows the user to disable a notification for 7 days. |
[tool_disable_days_8] |
A URL to a web page that allows the user to disable a notification for 8 days. |
[tool_disable_days_9] |
A URL to a web page that allows the user to disable a notification for 9 days. |
[tool_disable_days_10] |
A URL to a web page that allows the user to disable a notification for 10 days. |
[tool_edit] |
A URL to a web page which allows the user edit the
notification. For example, |
[tool_enable] |
A URL to a web page that allows the user to enable a disabled notification. |
[tool_login]
|
A URL to a web page that allows the user to login to the system. |
[tool_options] |
A URL to a web page that provides the all of the options available for a notification. |
[tool_owner] |
A URL to a web page that provides the user with the details of the owner and send them a message. |
[tool_recommend] |
A URL to a web page that allows the user to recommend the report or notification to another user of the system. |
[tool_refresh] |
A URL to a web page that refreshes the item. |
[tools] |
The system replaces this token with a list of tool links,
allowing the user to edit, refresh, disable or delete the notification, recommend it
to a friend, or log in to the system. If the link is in an email, most email clients open a web browser and the user can log in to work with a live web page instead of a static email. If you do not want the complete list of tool links, individual links can be constructed using the tokens below. |
[tripdate]
|
The date and time that the content was created. |
[trip_explain] |
A description of why the notification was triggered or delivered. |
[type]
|
The type of the notification. |
[values] |
The system replaces this token with all of the data tables
within the notification. Using this token allows a template to work for all
notifications. Each fact or report table within delivered content is created as rows of a table. For this reason all [values] tokens must be embedded within a table tag, allowing the template creator to specify the attributes of the table and to create column headers and footers. If you do
not want the contents of the [values] token to affect any other table structures
within the template, place it within its own table tag. For example, |
[values1] , [values2] etc. |
Specifies where to place specific data tables. The system replaces
the Note the following:
|
[version]
|
Inserts the current product version into the notification. You
would typically use this token in a statement that appears at the bottom of the
notification. For example, |