Skip to main content
{% partial file="my_partial" /%}

Examples

Basic Usage

{% partial file="my_partial" /%}

Passing Variables from Frontmatter

{% partial file="my_partial" variables={
	my_category=$category
} /%}

Passing Hardcoded Values

{% partial file="my_partial" variables={
	my_category="Home"
	sales_threshold=10000
} /%}

Attributes

file
string
required
Path to the partial to render. Leading slash means “from the project root” (recommended, e.g. /partials/header); without slash, the path resolves relative to the referencing page’s directory.
variables
options group
Variables to pass to the partial, must be variables from frontmatter or hardcoded values.