Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Mustache is a logicless template used for creating Dynamic contentThe mustache template consists of tag names surrounded

Mustache Tag:

Mustache tags are denoted by double curly braces surrounding the tag key.

Example:

{{ msg.sample }} - Here msg.sample is the tag key.

Mustache Template:

The mustache template is a string that contains any number of mustache tags

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 renderedAll the mustache tags are HTML escaped by default.

So If we don't want Handlebars to escape a valueit to be HTML escaped, we might need to use “triple stash” or “&”.

This would be helpful when sending links through SMS or Email.

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

...

...

In the above example, the value in msg.sampleLink will be parsed.