Skip to content

render

Renders a snippet with an isolated scope.

Syntax

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

Variables must be passed explicitly — the snippet cannot see the parent template’s variables. Supports with/as ({% render 'card' with product as item %}) and for to loop ({% render 'card' for products as product %}).

Example

{% render 'price', product: product %}

Output:

The snippet's output with `product` bound.