content_for
Renders theme blocks.
‘blocks’ renders the current section’s (or block’s) theme blocks in their saved order. ‘block’ renders one static block with a fixed type and id. closest.product: value hands an object to every block below.
Syntax
Section titled “Syntax”{% content_for 'blocks' %} · {% content_for 'block', type: 'price', id: 'main-price' %}Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
'blocks' | 'block' (required) |
string | All theme blocks |
type |
string | Block file in blocks/ (static block). |
id |
string | Stable id of the static block. |
Related
Section titled “Related”Compatibility
Section titled “Compatibility”Shopify: Same as Shopify.
Since theme platform 1.0.
Was this page helpful?

