Skip to content

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.

{% content_for 'blocks' %} · {% content_for 'block', type: 'price', id: 'main-price' %}
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.

Shopify: Same as Shopify.

Since theme platform 1.0.

Was this page helpful?