Appearance
render
Renders a reusable snippet by name, optionally passing variables into it.
Snippets are managed in Website > Templates.
Usage
liquid
{% render 'snippet-name' %}With variables:
liquid
{% render 'snippet-name', var1: value1, var2: value2 %}Options
| Option | Description |
|---|---|
'snippet-name' | Required. The name of the snippet to render. |
key: value | Optional variables to pass into the snippet. Any number of key/value pairs may be passed. Values must be available in the current context. |
Example
Render a snippet that outputs a grid of models filtered by division:
liquid
{% render 'artist-grid', divisionHandle: 'mainboard' %}Notes
- Variables are scoped to the snippet: variables passed via the tag are available within the snippet but do not persist in the parent context after rendering.
- Use in page and post editors: snippets can be rendered from within page or post content by placing the tag inside a
<code>block in the editor. This allows template-like functionality outside of layout templates — for example, embedding a dynamic model grid within a static page. - Missing snippets: if the named snippet does not exist, the tag renders nothing. No error is thrown.
- Allowed characters in snippet names and variable keys:
a-z A-Z 0-9 - _