Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

In this document, you will learn how to use Mustache Template.

Mustache is a logicless template used for creating Dynamic content

The mustache template consists of tag names surrounded by double curly braces {{ }}

The tag could be used as a placeholder and it will be replaced with the value during the run time. This will help to render dynamic values.

Example:

In the above example, the value stored in the msg.sample will be evaluated in the runtime.

Using URL or links in Mustache:

In some cases like SMS, the URL inside a Mustache is encoded.

So if we try to render the value of the Mustache, the encoded value would be rendered.

So If we don't want Handlebars to escape a value, we might need to use “triple stash” or “&”

Example: {{{ expression }}} or {{ &expression }}

  • No labels