Skip to Content

Liquid Tags in Themes

This page covers theme authoring patterns for Liquid tags. For full tag syntax and examples, see the Liquid tags reference.

{% render %}

Snippets are loaded from the snippets/ directory with {% render %}. Rendered snippets run in an isolated scope — variables from the parent template are not visible unless you pass them explicitly:

{% render 'product-card', product: product, show_vendor: true %}

Inside snippets/product-card.liquid:

<h3>{{ product.title }}</h3> {% if show_vendor %} <span>{{ product.vendor }}</span> {% endif %}

{% assign %} inside the snippet does not affect the parent template.

Other theme tags

These tags are commonly used in storefront themes. See the reference for syntax:

TagPurpose
{% render %}Load a snippet from snippets/
{% section %}Fixed section placement
{% sections %}Section group (header/footer)
{% block %}Static block placement
{% container %}Block drop zone inside a section
{% layout %}Choose layout wrapper
{% form %}Storefront forms — see Forms
{% stylesheet %} / {% javascript %}Deduplicated inline assets — see Assets