Skip to content

section

Renders a section statically.

Its settings come from the section’s schema defaults or the theme’s settings_data. Use it in layouts and custom pages; templates list their sections in JSON instead.

{% section 'name' %}
sections/promo.liquid
<p class="promo">{{ section.settings.text }}</p>{% schema %}{"name":"Promo","settings":[{"type":"text","id":"text","label":"Text","default":"Eid sale: 20% off"}]}{% endschema %}
Liquid
{% section 'promo' %}
Output
<div id="shopify-section-promo" class="shopify-section"><p class="promo">Eid sale: 20% off</p></div>

Shopify: Same as Shopify.

Since theme platform 1.0.

Was this page helpful?