Formatting and filters for inline edited template

These do not work for uploaded template files and are only available using the inline edited templates.

We use Liquid templating and full documentation can be found here.

Filter examples

Hello {{ 'tobi' | upcase }}
Hello tobi has {{ 'tobi' | size }} letters!
Hello {{ '*tobi*' | textilize | upcase }}
Hello >{{ 'now' | date: "%Y %h" }}

Standard filters

Here are a selection of other filters you may want to use. More advanced examples are available here.

  • date – reformat a date (syntax reference)
  • capitalize – capitalize words in the input sentence
  • downcase – convert an input string to lowercase
  • upcase – convert an input string to uppercase
  • escape – escape a string
  • strip_html – strip html from string
  • strip_newlines – strip all newlines (\n) from string
  • replace – replace each occurrence e.g. {{ ‘foofoo’ | replace:’foo’,’bar’ }} #=> ‘barbar’
  • remove – remove each occurrence e.g. {{ ‘foobarfoobar’ | remove:’foo’ }} #=> ‘barbar’
  • truncate – truncate a string down to x characters. It also accepts a second parameter that will append to the string e.g. {{ ‘foobarfoobar’ | truncate: 5, ‘.’ }} #=> ‘foob.’
  • prepend – prepend a string e.g. {{ ‘bar’ | prepend:’foo’ }} #=> ‘foobar’
  • append – append a string e.g. {{ ‘foo’ | append:’bar’ }} #=> ‘foobar’
  • minus – subtraction e.g. {{ 4 | minus:2 }} #=> 2
  • plus – addition e.g. {{ ‘1’ | plus:’1′ }} #=> 2, {{ 1 | plus:1 }} #=> 2
  • times – multiplication e.g {{ 5 | times:4 }} #=> 20
  • divided_by – integer division e.g. {{ 10 | divided_by:3 }} #=> 3
  • round – rounds input to the nearest integer or specified number of decimals