---
title: "Getting Started with Liquid Markup"
slug: "getting-started-with-liquid-markup"
updated: 2026-04-16T19:35:12Z
published: 2026-04-16T19:35:12Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.technolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started with Liquid Markup

**Liquid markup**is a templating language used to create dynamic content.

Originally created by Shopify, [Liquid](https://shopify.dev/docs/api/liquid) is an open-source project used by many world-class web applications, including Slate.

It can be used anywhere in Slate that you can use merge fields: in decision letters, Deliver mailings, dashboards, portals, and more.

[Getting Started With Liquid Markup](https://player.vimeo.com/video/1108450720?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479)

## Basic components

There are three basic Liquid components:

- **Objects,**which contain content to be displayed on a page using `{{ double curly braces }}`
- **Tags,**which create logic and loops using `{% curly percentage delimiters %}`
- **Filters,**which change the output of Liquid objects using `{{ double curly braces and | a pipe delimiter }}`

You’ll get a deeper understanding of each of these components as you explore this section. Let’s look at an example.

#### Example: Different messages for different majors

Here’s an example of some code that uses **tags** to tailor a message to the recipient’s choice of major:

```plaintext
{% if {{major}} == 'Philosophy' %}
    Trying to grasp Zeno's paradox? You'll get there. Or you might not.
{% elsif {{major}} == 'Math' %}
    You picked a prime opportunity to study math!
{% else %}
    Haven't decided on a major yet? We've got you covered!
{% endif %}
```

There are four tags in use in this conditional statement:

The `if` tag begins the conditional statement. If the recipient’s `major` is *Philosophy*, the following message appears:

```plaintext
Trying to grasp Zeno's paradox? You'll get there. Or you might not.
```

The `elsif` tag gives the code block another option: if the recipient’s `major` is not *Philosophy*, but is *Math*, they’ll see:

```plaintext
You picked a prime opportunity to study math!
```

If the readers’ `major` is not *Philosophy* and is also not *Math*, Liquid executes the `else` statement, and the recipient sees:

```plaintext
Haven't decided on a major yet? We've got you covered!
```

The conditional block is terminated by the `endif` tag.

The tags, enclosed in curly braces and percent signs `{% %}`, are distinguishable from our email body content, which aren’t enclosed in a tag.

## Objects and comparisons

The most basic expression of Liquid markup is making content appear with the curly brace delimiters `{{ }}`.

In conjunction with tags, you can compare values with **comparison operators.**

📖 [Objects and comparisons](/v1/docs/objects-comparisons)

## Tags

Tags let you define logic.

### Conditional

Conditional tags let you define the conditions under which content should appear.

#### `if` and `elsif`

Determines if one value is equal to another value.

```plaintext
{% if {{major}} == 'Philosophy' %}
    Existentialism? Don't get us started!
{% elsif {{major}} == 'Biology' %}
    It's in our genetics to drift toward academic excellence!
{% endif %}
```

#### `else`

A catchall ending statement that executes if none of the conditional statements above evaluate to be true:

```plaintext
{% if {{app_program}} == 'Art' %}
    Welcome to Slate University's Fine Arts Program!
{% elsif {{app_program}} == 'Medicine' %}
    Welcome to Slate University's School of Medicine!
{% else %} 
    Welcome to Slate University!
{% endif %}
```

📖 [The If, Elsif, and Else Tags](/v1/docs/if-else-elsif-tags)

#### `unless`

Reverse of an if statement.

```plaintext
{% unless {{major}} != 'Quantum Physics' %}
    Achieving an A is probable.
{% endunless %}
```

📖 [The Unless Tag](/v1/docs/unless-tags-in-liquid-markup)

#### `case`

An efficient method of comparing a variable against multiple conditions.

```plaintext
{% case {{major}} %}
    {% when 'Philosophy' %}
        Existentialism? Don't get us started!
    {% when 'Biology' %}
        It's in our genetics to drift toward academic excellence!
    {% else %}
        We support you in your academic pursuits!
{% endcase %}
```

📖 [The Case Tag](/v1/docs/case-tags-in-liquid-markup)

### Iteration tags

#### `for`

Loops through a range, which can be an array.

```plaintext
{% for interest in academic_interest %}
    {{interest}}
{% endfor %}
```

📖 [The For Tag and Liquid Markup Looping](/v1/docs/liquid-markup-looping)

### Variable

#### `assign`

Assigns a value to a variable.

```plaintext
{% assign missing_items = {{Missing-Checklist-Items}} | split: "|" %}
```

📖 [The Assign Tag](/v1/docs/assign-tags-in-liquid-markup)

#### `capture`

Captures and assigns a value to a variable.

```plaintext
{% capture team %}
    {{sex}}'s {{sport}} 
{% endcapture %}
```

📖 [The Capture Tag](/v1/docs/capture-tags-in-liquid-markup)

## Filters

Filters let you modify output.

```plaintext
{{"Hello world!" | upcase}}
```

📖 [Liquid Markup Filters](/v1/docs/liquid-markup-filters)

## Using Liquid markup in Slate

Like content blocks and snippets in Slate, Liquid markup can be used to create content that’s relevant to the user in portals, Deliver mailings, and more.

Some other examples include:

- **Letter templates:**[MergePublic queries](/docs/displaying-custom-fields-in-decision-letters-merge-queries) can access exports of custom fields not available by default in letter templates.
- **Dashboards:**Access to exports are created directly in the query tool of [Dashboards](/v1/docs/records-dashboards)
- **Portals (Reader, Status, Event):**Queries for accessing exports are directly created and accessed within the portal and connected by the method. [Using Liquid Markup in Portals](/v1/docs/using-liquid-markup-in-portals)
- **Forms:**Exports are created directly in the *Merge Fields*section in the *Edit Properties*menu
- **Mailings:**Liquid markup can be accessed by using recipient list queries and the WYSIWYG editor
- **Content Blocks and Snippets:**[Dynamic Content Blocks](https://knowledge.technolutions.net/v1/docs/en/dynamic-content-blocks)

## Additional resources

Check out our **Joy of Liquid Markup webinar** for an audiovisual crash course in using Liquid markup in Slate:

[Embedded content](https://www.youtube.com/embed/D6XJqwt_-gQ)

## Related

- [The Joy of Liquid Markup](/the-joy-of-liquid-markup.md)
