---
title: "The For Tag and Liquid Looping"
slug: "liquid-markup-looping"
updated: 2026-04-16T19:43:23Z
published: 2026-04-16T19:43:23Z
canonical: "knowledge.technolutions.net/liquid-markup-looping"
---
> ## 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.
# The For Tag and Liquid Looping
In [Liquid markup](/v1/docs/getting-started-with-liquid-markup), the `for` tag lets you loop through an array of objects and output information about each object. This is sometimes referred to as **Liquid looping** or **for looping**.
For example, you can take a list of upcoming events and, for each of them, display its title, date, and URL.
Looping through the contents of an array takes two steps:
1. Building the array with a **dictionary subquery export**
2. Using **Liquid markup** to loop through the array
> [!NOTE]
> ✨ Prompting Slate AI
>
> Ask [Slate AI](/v1/docs/slate-ai) for help writing Liquid markup loops for your specific situation:
>
> - 💬 *Show me how to use a Liquid loop to list all of a student’s upcoming events, displaying each event’s title and date in a portal message.*
> - 💬 *How do I build a dynamic, data-driven checklist for an applicant dashboard using Liquid tags and loops in a portal widget?*
> - 💬 *Display each of a student's recommenders and their submission status within an interview confirmation email.*
## Step 1: Creating the dictionary subquery export
First, we create a subquery export with a *dictionary* output method. We’ll explore the dictionary method in more detail a little later.
1. [In a query](/v1/docs/queries-overview), create a subquery export.
2. Configure the following settings:
- **Name:** Enter a name. For example, `received-checklist-items`. The name must be computer friendly (all lowercase and one word, using hyphens `-` or underscores `_` instead of spaces).
- **Output:** Dictionary
- **Row Limit:** If you want to return a certain number of objects, enter a number in the row limit setting. Otherwise, leave the row limit setting empty.
3. Create a **join** to the base of the object you want to return. For example, Checklists.
4. Add the **exports** you want returned by your loop. For example, the subject and fulfilled date of a checklist item.
5. Rename the exports so they can be called as Liquid markup tags later on. That is: **all lowercase, separated by hyphens**.
.png?sv=2026-02-06&spr=https&st=2026-11-03T22%3A38%3A21Z&se=2026-11-03T23%3A38%3A21Z&sr=c&sp=r&sig=psG90%2Big9LUr0K1QhvJSCDNjzfF2UIKWZZlJ9urzWsU%3D)
6. Add any needed filters and sorts.

7. Select **Save.**
.png?sv=2026-02-06&spr=https&st=2026-11-03T22%3A38%3A21Z&se=2026-11-03T23%3A38%3A21Z&sr=c&sp=r&sig=psG90%2Big9LUr0K1QhvJSCDNjzfF2UIKWZZlJ9urzWsU%3D)
Completed subquery
### How the dictionary output works
The **dictionary** output setting tells Slate to transform a subquery export into an **array**.
An [array](https://en.wikipedia.org/wiki/Array_(data_structure)) is a data structure that stores elements in a list in a specific order.
Slate transforms the subquery export into XML by using the following P-K-V (pair: key, value) data structure:
1. Each **object (here, an application)** is enclosed in a `<row>` tag
2. Each **export** is enclosed in a `<p>` tag.
3. In each `<p>` tag:
- The export's **name** is enclosed in a `<k>` tag
- The export's **value** is enclosed in a `<v>` tag
When we run the query containing the subquery export we created, we find a single application is represented like so:
```xml
{{checklist.subject}}: Received on {{checklist.fulfilled-date}}
{% endfor %} ``` #### Each object as an item in an ordered list ```xml| Checklist Item | Received Date |
|---|---|
| {{checklist.subject}} | {{checklist.fulfilled-date}} |