Docs
OverviewTemplate SyntaxQuick Guide

Resources

Source code

Modifiers

Text
Casing
lowerslugtitletitle_modelupper
Edit
concatreplacereplace_patternreverseshortenwrap
Split & join
joinlinessplit
Trim
trimtrim_prefixtrim_suffix
Escape
escape_htmlescape_jsescape_url
Format
currencydecimalformatlengthline_numbers
Collections
Access
findfirstkeylastpluck
Query
filterhasis
Transform
flattenmapmergesortsum
Files & paths
File
file
Path
dirnameextext_dotext_prependext_trimfilename
Convert
Parse
from_csvfrom_jsonfrom_yaml
Serialize
jsonmarkdownyaml
Logic
Compare
eqgtgtenot
Default
default
Render
Template
template
Docs/Sintax/Text/Format

Format

Format numbers and strings for display.

Format

currencyConverts a numeric value between currency units by scaling it with a ratio of unit sizes: the result is value * toUnits / fromUnits, truncated to a whole integer.{{ price | currency:1,100 }}decimalFormats a number with the given number of decimal places, rounding to the nearest value at that precision.{{ ratio | decimal:4 }}formatRenders a date/time value using a PHP-style date layout (Y is the 4-digit year, m the zero-padded month, d the day, H:i:s the time, and so on).{{ at | format:'Y-m-d' }}lengthReturns the number of UTF-8 bytes in a string, so a multi-byte character such as "é" counts as more than one.{{ name | length }}line_numbersPrepends each line of the input with a line number counting up from a given start line, so line_numbers:6 renders a block as if it began at line six.{{ body | line_numbers:6 }}
Edit or read the source on GitHub
Previousescape_urlNext currency

Built with in Vilnius, Lithuania Say hello!

ProductsOpen sourceDocs GitHub