Liquid filters
Filters change the output of a Liquid object. They are used within an object and are separated by a pipe character.
Filters let you change the way that a Liquid object is displayed. In Current, you'll find the currency, number, and localedate filters used a lot in our document layouts. 
Filters are placed within an object after a pipe character( | ), with optional data supplied after a colon.
Common filters
localedate
localedateFormats a date as per the logged in user’s language settings.
Input
{{ invoice.invoiced_at | localedate }}Output
In “English (United States),” this might output 1/12/2021 (M/D/YYY) but in other languages this might output 12/01/2021  (DD/MM/YYYY).
localedatetime
localedatetimeFormats the date and time as per the logged in user’s language settings.
Input
{{ order.deliver_starts_at | localedatetime }}Output
In “English (United States),” this might output 1/12/2021 5:30PM (M/D/YYY 12hr clock) but in other languages this might output 12/01/2021 17:30  (DD/MM/YYYY 24hr clock).
timezone
timezoneWhen using 'now' to return the date and time now, Current RMS returns the UTC time. Use timezone  to change the date and time to a particular region.
{{ 'now' | timezone:"Europe/London" | localedatetime }}For a list of timezones, edit your user profile and check the “Timezone” drop-down.
Date filter referencenumber
numberA decimal precision formatter. You can specify how many decimal places you’d like to add.
Input
{{ item.quantity | number }}
{{ item.quantity | number:3 }}Output
1
1.000currency
currencyFormats a number using the currency symbol set in System Preferences and the user’s language settings.
Input
{{ item.price | currency }}Output
$149.00newline_to_br
newline_to_brWhere you’ve inserted a new line into a text field (\n ), this filter inserts an HTML break (<br> ).
Input
{{ order.external_description | newline_to_br }}Output
Thanks for your interest.
Contact us if we can do anything.markdown
markdownTells Current to format text as Markdown.
Input
{{ order.external_description | markdown }}Where the external description is...
**Thank you for your interest!** Contact us if we can do _anything_.Output
Thank you for your interest! Contact us if we can do anything.
bool_to_word
bool_to_wordConverts true or false into “Yes” and “No” in your local language.
Input
{{ item.has_discount? | bool_to_word }}Output
Yesto_words
to_wordsOutputs numbers to words, useful for regions where invoices must show the amount due in words.
Input
{{ invoice.charge_including_tax_total | to_words }} Output
One hundred and ninety nineString filters
append
appendAdd information to the end of a string:
Input
{{ order.name | append:"!" }}Output
V-Blast Music Festival!capitalize
capitalizeMakes the first letter of a string capitalized.
Input
{{ order.name | capitalize }}Output
V-blast music festivaldowncase
downcaseChange the output to lowercase.
Input
{{ order.name | downcase }}Output
v-blast music festivalprepend
prependAdd information to the start of a string:
Input
{{ order.name | prepend:"We are preparing your order: " }}Output
We are preparing your order: V-Blast Music Festivalremove
removeRemoves every occurrence of a particular substring from a string.
Input
{{ order.name | remove:"Festival" }}Output
V-Blast Musicremove_first
remove_firstRemoves the first occurrence of a particular substring from a string.
Input
{{ order.name | remove_first:"Festival" }}Output
V-Blast Musictruncate
truncateTruncate a string to a particular number of characters.
Input
{{ order.name | truncate:3 }}Output
V-Blupcase
upcaseChange the output to uppercase.
Input
{{ order.name | upcase }}Output
V-BLAST MUSIC FESTIVALMaths filters
ceil
ceilRounds up to the nearest integer.
Input
{{ item.price | ceil }}Output
If the item price is 1.60, this will be 2.
If the item price is 1.30, this will still be 2.
divided_by
divided_byDivides an output by a number.
Input
{{ item.price | divided_by:2 }}floor
floorRounds down to the nearest integer.
Input
{{ item.price | floor }}Output
If the item price is 1.60, this will be 1.
If the item price is 1.30, this will also be 1.
minus
minusSubtracts a number from an output.
Input
{{ order.charge_including_tax_total | minus:order.tax_total }}modulo
moduloDivides an output by a number and returns the remainder.
plus
plusAdds a number to an output.
Input
{{ item.price | plus:10 }}round
roundRounds the output to the nearest integer or specified number of decimals.
Input
{{ item.price | round }}Output
If the item price is 1.60, this will be 2.
If the item price is 1.30, this will be 1.
times
timesMultiplies an output by a number.
Input
{{ item.price | times:2 }}Array filters
first
firstReturns the first item in an array.
Input 
{{ item.accessories | first }}last
lastReturns the last item in an array.
Input
{{ item.accessories | last }}sort
sortSorts an array by a given attribute.
Input
{% assign sorted_quotations = project.quotations | sort:'name' %}Last updated
Was this helpful?