---
title: Liquid Templating
description: Liquid syntax guide for PageWeave pages — variables, filters, tags, and data table access.
section: Platform
order: 5
---

# Liquid Templating

All HTML in PageWeave supports Liquid. Use it for dynamic content, loops, conditionals, and data table access.

## Variables

### Global Drops

- `site.name` — Website name
- `site.subdomain` — Website subdomain
- `site.domain` — Custom domain (if set)
- `site.indexable` — Search engine indexing enabled
- `site.tables.{slug}` — Data table rows

- `page.title` — Page title
- `page.path` — Page URL path

### Template Pages

When a page is associated with a table (path contains `:slug`), the `row` variable is available:

- `row.id` — Row UUID
- `row.slug` — URL-safe slug
- `row.created_at` — Creation timestamp
- `row.updated_at` — Last update timestamp
- `row.url` — Full URL to this row's page
- `row.{field}` — Any table field
- `row.{field}.{nested}` — Nested data

## Syntax

```liquid
{{ site.name }}
{% if site.indexable %}
  <meta name="robots" content="index, follow">
{% endif %}
{% for i in (1..3) %}{{ i }}{% endfor %}
{% assign x = "value" %}
```

## Filters

Standard Liquid filters: `upcase`, `downcase`, `date`, `truncate`, `times`, `divided_by`, `append`, `prepend`, `strip_html`.

Table filters:
- `where: "field", "value"` — Filter rows
- `sort_by: "field", "desc"` — Sort rows

```liquid
{% for post in site.tables.blog_posts | where: "published", "true" | sort_by: "created_at", "desc" %}
  <h2>{{ post.title }}</h2>
{% endfor %}
```

## Data Tables

### Basic Loop

```liquid
{% for post in site.tables.blog_posts limit: 10 %}
  <h2>{{ post.title }}</h2>
  <p>{{ post.excerpt | truncate: 150 }}</p>
{% endfor %}
```

### Pagination

```liquid
{% paginate site.tables.blog_posts by 10 order_by: "created_at" order_dir: "desc" where: "published:true" %}
  {% for post in site.tables.blog_posts %}
    {{ post.title }}
  {% endfor %}
  {% if paginate.next %}
    <a href="{{ paginate.next.url }}">Next</a>
  {% endif %}
{% endpaginate %}
```

Default limit: 20 rows. Hard cap: 100.

### Template Page Example

```liquid
<article>
  <h1>{{ row.title }}</h1>
  <p>Published: {{ row.created_at | date: "%B %d, %Y" }}</p>
  <div>{{ row.body }}</div>
  <a href="{{ row.url }}">Permalink</a>
</article>
```

## Syntax Warnings

Liquid syntax errors are reported via `liquid_warnings` in page responses.
