What is Liquid?

Liquid is an open-source, high-performance, extendible, simple to use, and secure template language created by Shopify.

Why Liquid?

Use can use Liquid in cast.app for advanced personalization and to create dynamic content and tie customer insights to practical advice and recommendations. For example, you could recommend executives an upsell if they have the upsell authority.

You can use liquid in Narrations, Snippets, Recommendations, Navigation, and slides.

Getting started with Liquid

Liquid statements are built from variables, filters, and tags.

Here is an example of liquid, that personalizes the salutation.

{% if contact_name == "John" %}
	Hi Johny,  It was good to see you at the CS100 conference.
{% elsif contact_name == "Karen" %}
	Dear Aunt Karen,
{% else %}
	Hey {{ contact_name }},
{% endif %}
```

Variables contain information that you want to use, and the variables that Looker provides are described on this page.
You can further modify those values by using filters and tags, which you can read about in this [Liquid](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers) guide.

There are two types of markup in Liquid: Output and Tag.

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



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

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

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

Output

An output statement is a set of double curly braces containing an expression; when the template is rendered, it gets replaced with the value of that expression.

Here is a simple example of output:

Hello {{name}}
Hello {{user.name}}
Hello {{ 'cast user' }}

You can find the language documentation here and here.


Table of contents