,
),
)left
or right
or both
)asc
, desc
){{format_date token_name "format" "language_code" "add/subtract time"}}
{{format_date _date 'DD-MM-YY'}}
{{format_date _date "MMMM DD YYYY" "fr"}}
{{format_date _date "MMMM DD YYYY" "en" "+1years"}}
<+/-> <amount as a number> <unit>
. Unit can be "years", "months", "weeks", "days", "hours", "minutes", or "seconds". Here are some examples:+1hours
-3days
+5years+2months-3minutes
+8h
{{format_date _date "MMMM DD YYYY" "en" "+1years"}}
{{format_date _date "MMMM DD, YYYY" "en" "+6months"}}
{{format_number number thousand_sep decimal_sep number_of_decimal_places}}
{{format_number price "." "," 0}}
{{format_number invoice_total "." "," 3}}
{{abbreviate FieldName suffix}}
{{abbreviate name}}
{{abbreviate name "."}}
{{format_phone landline "format"}}
{{format_phone landline "(%3) %3-%4"}}
{{format_phone landline "+1-%3-%3-%4"}}
{{format_phone credit_card_number "%4-%4-%4-%4"}}
{{number_to_words input ouput_format="in" suffix=" " decimal_suffix=" "}}
{{number_to_words number}}
{{capitalize (number_to_words amount suffix="dollars" decimal_suffix="cents")}}
{{number_to_words currency output_format="in" suffix="rupees" decimal_suffix="paise"}}
{{number_to_words price output_format="in" suffix="rupees"}}
{{number_to words price suffix="dollars"}}
{{number_to_ordinal Number}}
Example{{number_to_ordinal Number}}
{{capitalize (number_to_ordinal number1)}}
{{number_to_ordinal number}}
{{join content separator lookup="lookup_key"}}
{{join SampleName ","}}
{{join employees lookup="Name.Firstname"}}
{{replace input match_str replace_str}}
( Here the match_str can be either a text or regex) {{replace input to_replace replacer}}
{{replace input (regex "[a]" "g") "e"}}
{{regex pattern flags}}
(No flags are set by default).{{replace content (regex "[a-z]" "g") "*"}}
MaryJane123
M***J***123
{{replace data (regex "[0-9]+" "g") "quot;}}
1239HomeAlone42
*HomeAlone*
{{strip input match_str side=side}}
{{strip input}}
WallMart
WallMart
{{split input separator}}
(separator can either be text or Regex){{#list (split FieldName ",")}}
{{this}}
{{/list}}
{{#list (split FieldName (regex "\d+" "g"))}}
{{this}}
{{/list}}
{{sort content order=order lookup="lookup_key"}}
{{#each (sort cost order="desc")}}
{{this}}
{{/each}}
{{#each (sort items lookup="price" order="asc")}}
{{name}} is available at {{price}} per {{unit}}.
{{/each}}
each
and list
{{var "token" value}}
{{var "cost" 500}}
{{var "price" 7599}}
{{var "amount" MRP}}
{{var "token"}}
{{var "cost"}}
{{var "price"}}
{{pad number output_width pad_with='character' style='prefix|suffix'}}
{{pad number 7}}
{{pad number 9 pad_with='#' style='suffix'}}
{{concat string1 string2 ....}}
{{insert_image (concat "https:" url) 300 300}}
//raw.githubusercontent.com/tiholic/exif-orientation-examples/master/Portrait_0.jpg
{{group_by FieldName lookup="lookup_key"}}
Key
and items
can be accessed from inside the iterator(#each
or #list
). Key
contains value of "lookup_key"
for the current record, items
contain the records which are present under current group.{{#each (group_by employees lookup="role.code")}}
Number of employees in role {{key}}: {{items.length}} and they are {{join items ", " lookup="name.first"}}
{{/each}}
{
"employees": [
{ "role":{ "code": "TL" }, "name": { "first": "Dave" } },
{ "role": { "code": "TL" }, "name": { "first": "Chris" } },
{ "role": { "code": "PM" }, "name": { "first": "Matt" } },
{ "role": { "code": "TL" }, "name": { "first": "Emma" } },
{ "role": { "code": "PM" }, "name": { "first": "Jenn" } }
]
}
Number of employees in role TL: 3 and they are Dave, Chris, Emma
Number of employees in role PM: 2 and they are Matt, Jenn
keys
.items
corresponding to the key "TL" are :{ "role": { "code": "TL" }, "name": { "first": "Emma" } }
{ "role": { "code": "TL" }, "name": { "first": "Chris" } }
{ "role":{ "code": "TL" }, "name": { "first": "Dave" } }
items
corresponding to the key "PM" are:{ "role": { "code": "PM" }, "name": { "first": "Jenn" } }
{ "role": { "code": "PM" }, "name": { "first": "Matt" } }
{{#each (group_by places)}}
Number of branches in {{key}}: {{items.length}}
{{/each}}
{
"places": [
"New York",
"Las Vegas",
"Chicago",
"New York",
"Las Vegas",
"New York"
]
}
Number of branches in New York: 3
Number of branches in Las Vegas: 2
Number of branches in Chicago: 1
keys
.items
corresponding to the key "New York" are 3.items
corresponding to the key "Las Vegas" are 3.items
corresponding to the key "Chicago" is 1.{
"url": "https://dummyimage.com/600x400/000/fff&text=hello world"
}
{
"url": "https://dummyimage.com/600x400/000/fff&text=hello world"
}
{
"url": "https://dummyimage.com/600x400/000/fff&text=hello%20world"
}
{
"url": "https%3A%2F%2Fdummyimage.com%2F600x400%2F000%2Ffff%26text%3Dhello%20world"
}