Liquid helpers
A reference to help you work with the Liquid templating language in Knock.
The Knock template editor uses Liquid syntax for control flow and variable declaration. Here are a few of the most common Liquid keywords our customers use within Knock. We recommend referencing the Liquid documentation for comprehensive syntax and usage information.
Knock-specific Liquid helpers
#Knock extends Liquid with helpers that format, transform, and evaluate data when rendering notification templates.
Date and time
#Numbers and currency
#Text and data
#Hashing
#Localization and formatting
#Date format options
#The format_date_in_locale and format_datetime_in_locale helpers accept date format options that control how the date portion is displayed.
Time format options
#The format_datetime_in_locale helper accepts time format options that control how the time portion is displayed.
Localization parameters
#The format_date_in_locale, format_datetime_in_locale, format_number, currency, and rounded_currency helpers take an optional locale parameter to format the output into a localized format. If we're missing a locale that you'd like us to support, please reach out.
Supported locales. af, ar, az, be, bg, bn, bs, ca, cs, cy, da, de, de-DE, el, en, en-US, en-GB, eo, es, es-419, et, eu, fa, fi, fr, fr-CA, fr-FR, gl, he, hi, hr, hu, id, is, it, ja, ja-JP, ka, km, kn, ko, lb, lo, lt, lv, mk, ml, mn, mr, ms, nb, ne, nl, nn, no, or, pa, pl, pl-PL, pt, pt-BR, rm, ro, ru, sk, sl, sq, sr, sv, sw, ta, te, th, tr, tt, ug, uk, ur, uz, vi, wo, zh, zh-CN, zh-Hans, zh-Hant
Dynamic data filters
#Knock provides a set of Liquid filters that dynamically load data from your Knock environment at template render time. These filters enable you to reference entities like users, objects, tenants, and subscriptions in your templates without passing all of the data in your workflow trigger call. For more details and examples, see referencing data in templates.