Skip to main content

Aqua Tags

Tags create logic, loops, and control the template flow. They’re wrapped in {% %}.

Control Flow

if / elsif / else

Conditional rendering based on truthiness.
Operators:

unless

Inverse of if - renders when condition is false.

case / when

Switch statement for multiple conditions.

Iteration

for

Loop through arrays and ranges.
Loop variables:
Parameters:
Parallel iteration: For loops that fetch async data per iteration (e.g. rendering a list of product cards where each card reads metafields), append parallel: true to evaluate every iteration concurrently instead of sequentially:
This is an Aqua-specific extension on top of standard Liquid. Use it when the iteration body issues independent I/O — re-ordering or shared mutable state inside the loop will not behave as expected. Ranges:
else (empty array):

break / continue

Control loop execution.

cycle

Alternates between values.
Named cycles for nested loops:

tablerow

Generates HTML table rows.
Parameters: cols, limit, offset

Variable

assign

Creates or updates a variable.

capture

Captures output into a variable.

increment / decrement

Creates and modifies counter variables.

Theme Tags

render

Renders a snippet with isolated scope.
With for loop:
Variables inside render are isolated - they don’t leak to the parent template.

include

Renders a snippet with shared scope (legacy).
Prefer render over include. Include shares scope which can cause variable collisions.

section

Renders a section (in layouts).

sections

Renders a section group (JSON file).

layout

Specifies which layout to use.

content_for

Dynamic block/section rendering.

Template Tags

comment

Content inside is not rendered.
Single-line shorthand:

raw

Outputs Aqua syntax literally.

aqua

Multiple tags in condensed format inside a single {% liquid %} / {% aqua %} block. Both keywords are accepted as aliases of each other, but new code should use {% aqua %}.
Inside the block, each line is a tag — no {% %} wrappers needed. Mix control flow (if, for, case), assignments (assign, capture), and includes (render, include, section, sections) freely.

echo

Output inside aqua blocks.

Form Tags

form

Creates HTML forms with CSRF protection.
Form types:
The customer form types (customer_login, create_customer, recover_customer_password, reset_customer_password, activate_customer_password, customer_address) power theme-rendered account pages. Field names, error handling, and full examples are in Theme Customer Accounts.
Product form example:
Form object properties:

Pagination

paginate

Paginates arrays.
Paginate object:

Section Schema

schema

Defines section/block configuration (JSON).
See Schema Reference for full documentation.

stylesheet

Scoped CSS for sections.

javascript

Scoped JavaScript for sections.

Whitespace Control

Add hyphens to strip whitespace:
Example: