Docs
OverviewTemplate SyntaxQuick Guide

Resources

Source code

Modifiers

Text
Casing
lowerslugtitletitle_modelupper
Edit
concathashreplacereplace_patternreverseshortenwrap
Split & join
joinlinessplit
Trim
trimtrim_prefixtrim_suffix
Escape
escape_htmlescape_jsescape_url
Format
currencydatedecimalfrom_datelengthline_numbers
Collections
Access
findfirstkeylastpluck
Query
filterhasis
Transform
cleanflattenmapmergesortsum
Files & paths
File
file
Path
dirnameextext_dotext_prependext_trimfilename
Convert
Parse
from_csvfrom_jsonfrom_yaml
Serialize
jsonmarkdownyaml
Logic
Compare
andeqgtgteltlteneqnotor
Default
defaultwhen
Render
Template
template
Datetime
add_daysadd_monthsadd_yearsdays_between
Math
adddividemultiplysubtract
Docs/Sintax/Collections/Query

Query

Filter, test, and search collections.

Query

filterReturns the items of a slice whose named field equals the search value.{{ items | filter:'role','admin' }}hasReports whether a collection contains something, and what "contains" means depends on the shape of the value.{{ tags | has:'featured' }}isReports whether the value equals any one of the given candidates, a compact way to write an "is this one of these" test in a template.{{ status | is:'active','pending' }}
Edit or read the source on GitHub
PreviouspluckNext filter

Built with in Vilnius, Lithuania Say hello!

ProductsOpen sourceDocs GitHub