Frameworks
Integrations
Mendix
SharePoint
Default UI
Modular UI
AnnotationManager
Annotation Types
Customize
Version 11
Version 10
v10.12
v10.11
v10.10
v10.9
v10.8
v10.7
v10.6
v10.5
v10.4
v10.3
v10.2
v10.1
v10.0
Version 8
v8.12
v8.11
v8.10
v8.9
v8.8
v8.7
v8.6
v8.5
v8.4
v8.3
v8.2
v8.1
v8.0
Version 7
Version 6
v6.3
v6.2
v6.1
v6.0
Version 5
Version 4
Version 3
Version 2
WebViewer Server
WebViewer BIM
keys
, denoted by the {{
start tag, and }}
closing tag -- these are often referred to as "moustache templates" (turn the {
around 90 degrees, and it looks like a moustache...).To see templates in practice check out this list of examples.
This data model will be expanded going forward in order to meet customer needs. If you require a specific feature, or don't believe that the current template framework can meet your needs, then please contact us.
Can be one of:
"key":"Value Text"
text
property: "key": {"text": "Value Text"}
text_lines
property: "key": {"text_lines": ["Line 1", "Line 2"]}
. The inserted text strings will be separated by line breaks.An image value is a JSON dictionary with the following required properties:
image_url
: [string] On web systems this can be a URL, on server/desktop systems it is expected to be a local filesystem path (absolute, or relative to the process working directory).width
: [number] Image width, in points (this is the physical width in the document, not the number of pixels)height
: [number] Image height, in points (this is the physical height in the document, not the number of pixels)Take a look at the image insertion example to see this in practical usage.
Structured input inserts document content that is more powerful that simple text replacement. It supports dynamic document structure, formatting, and styling. To insert structured input, use a JSON dictionary with one of the following properties:
html
: [string] HTML input ormarkdown
: [string] Markdown inputNot all features of html and markdown are supported, for more information please see: structured input
The JSON data can also be organized into objects. The tag {{a.b}}
will retrieve the value of property b
in object a
: {"a": {"b": "value"} }
.
Loops can be used to repeat content in a document and fill in unique data for each repetition. A Loop over the key var
is created using the syntax{{loop var}} ... {{endloop}}
:
The corresponding JSON value for the loop key must be an array of objects. The loop body is duplicated for each item in the array, and the tags in the body of the loop use values that are overridden by the JSON object in each iteration of the loop. Example JSON:
Produces:
Loops can be nested and combined with conditionals.
To generate a bulleted or numbered list with dynamic content, you can create a list loop as follows:
{{loop}}
tag must be within an item of the list.{{endloop}}
tag must be within a different item of the list.Example:
The JSON for list loops uses the same format as normal loops. Note: If there is any extra text (including whitespace) in the {{loop}}
or {{endloop}}
list items, those items will not be removed. For more details, see: content removal.
To generate a table with dynamic row content, add a table in the template document with the desired column structure, following the constraints:
{{loop}}
tag must be in the first column.{{endloop}}
tag must be in the last column (if the table only has one column, it can't be in the same cell as the {{loop}}
tag, otherwise it would loop within the cell, so place the {{endloop}}
tag in the next row).Example:
The JSON for tables row loops uses the same format as normal loops.
Conditionals can be used to conditionally include content in a document. A conditional on the key cond
is created using the syntax{{if cond}} ... {{endif}}
:
The JSON value corresponding to the condition key (cond
here) is converted to a boolean. It is evaluated as false when either:
false
, ""
, 0
, or null
If the evaluated value is false, the conditional's body is removed.
Conditionals can also have an {{else}}
clause:
The else clause body will be removed if and only if the condition evaluates to true.
Tag expressions can also use operators. There are currently four operators:
<expr>.<key>
: evaluates expr (must evaluate to a JSON object), then returns the property given by "key". "key" is limited to alphanumeric characters.not(<expr>)
: evaluates expr
, converts it to a boolean, and inverts the result.equal(<expr>, <expr>)
: evaluates each expression and returns true if they have the same value. Template keys can be compared to strings by using a string literal enclosed in single or double quotes. For example: equal(country, 'United States')
.empty(<expr>)
: evaluates expr
(must evaluate to a JSON array), and returns if the array is empty.These operators can also be used in combination. For example:{{if not(equal(customer.first_name, 'Paul'))}}
.
For more information, see the following resources:
Advanced features
For a specification of advanced features, and greater detail on behavior
Live Web Sample
To try a live sample of template filling using our WebViewer
Structured input
For inserting dynamic content using html or markdown
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales