Skip to content

Tokens in Document Editor

Variables

You can use variables inside {{}} tags to dynamically generate content.

For example:

{{CompanyName}}

Conditional Statements

You can also use conditional statements to control the flow of your document.

Equal to

Hello {{#if gender "==" "male" }}Sir{{else}} Madam {{/if}},

Greater than or equal to

{{#if age ">=" "18"}}
You are eligible to vote!
{{else}}
You are not old enough to vote yet.
{{/if}}

Greater than

{{#if "quantity" ">" "0"}}
Item is in stock.
{{else}}
Item is out of stock.
{{/if}}

Lesser than or equal to

{{#if "quantity" "<=" "10"}}
Only a few items left in stock.
{{else}}
Stock is plentiful.
{{/if}}

Less than

{{#if rating "<" "5"}}
This product has a below-average rating
{{else}}
This product has an average or above-average rating.
{{/if}}

Not equal to

{{#if status "!=" "completed"}}
Your order is still being processed.
{{else}}
Your order has been completed.
{{/if}}

Looping through Arrays

Bullted List

Create bulleted list using list

<ul style="list-style-type: disc;">
<li>{{#list items}}{{this}}{{/list}}</li>
</ul>

Numbered List

Creating numbered list

<ol style="list-style-type: decimal;">
<li>{{#list items}}{{this}}{{/list}}</li>
</ol>

Simple List

Creating simple list

{{#list productNames}}{{this}}{{/list}}

Table

Creating tables

<td colspan="3">{{#each productInfo}}</td>
</tr>
<tr>
<td>{{productName}}</td>
<td>{{price}}</td>
<td>{{quantity}}</td>
</tr>
<tr>
<td colspan="3">{{/each}}</td>