The section object

The section object lets you access a section's properties and setting values.

section.id

For static sections, returns the section's file name without ".liquid". For dynamic sections, returns a dynamically generated ID.

section.settings

Returns an object of the section settings set in the theme editor. Retrieve setting values by referencing the setting's unique id.

Input

<h2>{{ section.settings.heading }}</h2>
<a href="{{ section.settings.featured_collection.url }}">This week's best selling items</a>

Output

<h2>Weekly promotion</h2>
<a href="/collections/new-this-week">This week's best selling items</a>

section.blocks

Returns an array of the section's blocks.

Want to discuss this page?

Visit the Shopify Community