Liquid Markup - Introduction

Last edit: Sep 16, 2023

Liquid, also known as Liquid markup, is a template language employed within platformOS for crafting dynamic pages and facilitating dynamic configurations, such as adjustments based on the currently logged-in user. Many renowned companies and software, including Microsoft, Shopify, Zendesk, Jekyll, and many others, utilize Liquid in their applications. Use Liquid to establish authorization policies, or to define notifications through email, SMS, or API calls. To further streamline your experience, we've incorporated a wide array of filters and tags.


Liquid has a new syntax — visit the documentation of the liquid tag for an example. We are updating all of our Liquid code examples to reflect this change.


Output markup (which may resolve to text) is surrounded by

{{ matched pairs of curly brackets (ie, braces) }}


{{ user.name }} => John


Tag markup (which cannot resolve to text) is surrounded by

{% matched pairs of curly brackets and percent signs %}


{% if user %}
{% endif %}


Liquid filters are simple methods that modify the output of numbers, strings, variables, and objects.

Simple use case

{{ "honda crx" | upcase }} => HONDA CRX


Some filters accept arguments, for example, the replace filter accepts two:

{{ 'Hello liquid' | replace: 'liquid', 'world!' }} => Hello world!


Having a verbose version of code that will:

  1. Create string with words
  2. Prepend "Zero," in front of the string
  3. Append ",Five" string at the end
  4. Split it by comma to create an array of strings
  5. Print it to the source

{% assign numbers = 'One,Two,Three,Four' %}
{% assign numbersWithZero = 'One,Two,Three,Four' | prepend: 'Zero,' %}
{% assign all_numbers = numbersWithZero | append: ',Five' %}
{% assign all_numbers_array = all_numbers | split: ',' %}
{{ all_numbers_array }} => ZeroOneTwoThreeFourFive

You can achieve the same result in much shorter form by chaining the filters one after another:

{{ 'One,Two,Three,Four' | prepend: 'Zero,' | append: ',Five' | split: ',' }} => ZeroOneTwoThreeFourFive


If you want to use liquid text on your page but without executing it, use {% raw %} ... {% endraw %} syntax.


Allows you to leave un-rendered code inside a Liquid template. Any text within the opening and closing comment blocks will not be output, and any Liquid code within will not be executed.


Anything you put between {% comment %} and {% endcomment %} tags
is turned into a comment.


Anything you put between  tags
is turned into a comment.

You can also use comment inside the liquid tag:

{% liquid
    This is is my code comment
  echo 'This is not a comment'


We are always happy to help with any questions you may have.

contact us