Skip to content

stageblocks Tag

The stageblocks tag dynamically renders all content blocks associated with a page, event, or other content type. It’s the primary way to output block-based content in your templates.

{% stageblocks content_type %}
{% stageblocks content_type, blockType:template/path.liquid %}
ParameterRequiredDescription
content_typeYesThe type of content to render blocks for
blockType:templateNoOverride the default template for a specific block type

The stageblocks tag supports the following content types:

TypeDescription
pageStandard pages
eventEvents
seriesEvent series
seasonSeasons
venueVenues
personPeople (artists, performers, etc.)
organizationOrganizations
workCreative works
postBlog posts
blogBlog landing pages
collectionSmart collections
reusable-contentReusable content blocks

In your template files, use stageblocks to render all blocks associated with the current content:

<main>
<h1>{{ page.title }}</h1>
{% stageblocks page %}
</main>

The stageblocks tag wraps all rendered blocks in a container div:

<div class="content-blocks">
<!-- Block 1 output -->
<!-- Block 2 output -->
<!-- ... -->
</div>

Each block is rendered using its corresponding template from the blocks/ directory in your theme.

You can override the default template for specific block types by passing additional parameters:

{% stageblocks page, hero:blocks/hero-fullwidth.liquid %}

This renders blocks of type hero using blocks/hero-fullwidth.liquid instead of the default blocks/hero.liquid.

Multiple overrides:

{% stageblocks event, hero:blocks/event-hero.liquid, cta:blocks/event-cta.liquid %}
  1. The tag reads the blocks array from the content object (e.g., page.blocks)
  2. For each block, it determines the block type (e.g., hero, feature-grid, call-to-action)
  3. It looks for the corresponding template in blocks/[blockType].liquid
  4. If a template override is specified, it uses that template instead
  5. The block data is passed to the template as the block variable

Within block templates, you have access to the block object containing all the block’s field values:

{# blocks/hero.liquid #}
<section id="{{ block.id }}" class="block-hero">
<h2>{{ block.heading }}</h2>
<p>{{ block.description }}</p>
{% if block.image %}
<img src="{{ block.image | image_url: width: 1200 }}" alt="{{ block.image.alt }}">
{% endif %}
{% if block.cta_text and block.cta_link %}
<a href="{{ block.cta_link }}" class="btn">{{ block.cta_text }}</a>
{% endif %}
</section>
{# templates/page.liquid #}
{% comment %}
Standard page template with blocks
{% endcomment %}
<main class="page-content">
{# Page header #}
<header class="page-header">
<h1>{{ page.title }}</h1>
{% if page.description %}
<p class="lead">{{ page.description }}</p>
{% endif %}
</header>
{# Render all page blocks #}
{% stageblocks page %}
{# Page footer with metadata #}
<footer class="page-meta">
<p>Last updated: {{ page.updatedAt | date: '%B %d, %Y' }}</p>
</footer>
</main>