Website personalisation template functions
Website personalisation: Templating
In addition to the standard Scriban functions, there is a set of functions, filters and tags specific to Ometria Web Personalisation.
Objects
Ometria objects output data into a theme or template.
See also: Templating objects
Objects are wrapped in double curly brace delimiters {{ }}
, and look like this:
<h1>{{ product.titles.default }}</h1>
<h2>{{ product.titles.sub_title }}</h2>
When rendered this would produce an output such as:
<h1>Maxi Dress</h1>
<h2>A very fine satin maxi dress</h2>
Tags
Tags are used to create logic and to control flow inside of templates.
See also: Templating tags
Filters
Filters are used to modify the output of numbers, strings, objects, and variables.
They are placed within an output tag {{ }}
, and are denoted by a pipe character |
.
See also: Templating filters
<span>{{ product.pricing.price | money }}</span>
When rendered this would produce an output such as:
<span>$1,250.99</span>
Updated 2 days ago