← InboxTheme development, Module 3, lesson 4, 22 min
Build a 'Featured Coffee' section the merchant can edit How this works
A section is what a merchant drops onto a page. It has markup at the top and a {% schema %} block at the bottom that lists what's editable.
Each setting in the schema has a type, an id, and a default. You read it back in the markup as section.settings.<id>. Until the merchant edits it, the default is what shows.
< h2 > {{ section.settings.heading }} </ h2 >
{% schema %}
{
"name": "Featured coffee",
"settings": [
{ "type": "text", "id": "heading", "label": "Heading", "default": "Featured" }
],
"presets": [{ "name": "Featured coffee" }]
}
{% endschema %} Types you'll use: text (one line), richtext (formatted, its default needs a <p> wrapper), and url (a link picker). Why this matters in production ▾ This is the unit of work you'll do most often as a Shopify dev. A merchant or marketer says 'I need a band on the homepage I can change myself,' and you build a section: markup at the top, a `{% schema %}` at the bottom describing what's editable. Every theme is dozens of these.