Insites Docs Liquid Liquid Markup Overview

Liquid Markup Overview

Published on July 21, 2022, updated on September 06, 2023

Liquid (or Liquid Markup) is a template language used by Insites to build dynamic pages and to provide dynamic configuration (E.g. based on the currently logged-in user).

Use Liquid to provide an authorisation policy for forms and pages or to specify notifications (email, SMS, API). We have added a lot of filters and tags to make your life easier.

This article is divided into the following sections:

  • Output
  • Tags
  • Filters
  • Raw
  • Comment
Note

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

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

Example:

Tags

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

Example:

Filters

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

Simple Use Case:

Arguments

Some filters accept arguments. For example, the 'replace' filter accepts two:

Chaining

Having a verbose version of code that will:

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

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

Raw

If you want to use liquid text on your page without executing it, use .

Comment

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.

Input

Output

You can also use inside the tag:

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.