Developers · Pages and Layouts
Reusing Code Across Multiple Pages
Last updated 2 November 2026
Partials are reusable code snippets that you extract into separate files to keep your templates clean and DRY (Don't Repeat Yourself). They live in the
Using Partials
Include a partial in a page or layout using the
{% render 'shared/header' %}
{% render 'shared/footer' %}Passing Variables to Partials
Partials have their own variable scope. Pass data into a partial using named parameters:
{% render 'shared/card', title: 'My Title', description: product.summary %}Inside the partial,
Function Tag
Use the
{% function result = 'lib/queries/get_products', category: 'featured' %}The partial uses the
Organizing Partials
A common directory structure groups partials by purpose:
app/views/partials/
shared/ # Reusable UI components
forms/ # Form-specific partials
emails/ # Email template partialsYou can also manage partials through the Instance Admin. Navigate to CMS > Partials to create and edit them. See the Instance Admin documentation on Partials for details.