What is Liquid syntax?

Liquid syntax allows you to dynamically place content in document layouts and discussion templates.

Liquid syntax is a template language used in many web applications. In Current RMS, we use Liquid syntax to place dynamic content and modify data in document layouts and discussion templates.

In Liquid, there are three types of code:

  • objects

  • tags

  • filters

Objects

Objects are surrounded by matched pairs of curly brackets. They tell Current RMS where to show content on a layout.

For example, to output your company name, use:

{{ company.name }}

If you change your company name in System Setup in future, this will be reflected on all documents where you’ve used this Liquid object.

pageLiquid objects

Tags

Tags are surrounded by matched pairs of curly brackets and percent signs. They are used for logic operations and control flow.

For example, to print out your company tax registration number only if you’ve entered one, use:

{% if company.tax_registration_number != blank %}
  {{ company.tax_registration_number }}
{% endif %}
pageLiquid tags

Filters

Filters change the output of a Liquid object. They are placed within an object after a pipe character, with optional data supplied after a colon.

For example, to capitalize your company name, use:

{{ company.name | upcase }}
pageLiquid filters

Last updated