Some settings store a reference rather than a value: a menu, a product, a list of collections, a field of the current page. The template reads the live item. Bound settings work the same on sections and on blocks at any depth.
Menus#
A menu setting stores the chosen menu. The template reads the menu from settings.<id>_resolved:
{% assign menu = settings.menu_resolved %}
{% if menu.items.size > 0 %}
<nav aria-label="{{ menu.name }}">
{% for item in menu.items %}
{% if item.url != blank %}
<a href="{{ item.url }}"{% if item.current %} aria-current="page"{% endif %}{% if item.open_in_new_tab %} target="_blank" rel="noopener"{% endif %}>{{ item.title }}</a>
{% else %}
<span>{{ item.title }}</span>
{% endif %}
{% endfor %}
</nav>
{% endif %}
{% schema %}
{
"name": "footer-menu",
"settings": [
{ "id": "menu", "type": "menu", "default": "footer",
"editor": { "label": "Menu", "group": "content" } }
]
}
{% endschema %}
Field |
Meaning |
|---|---|
|
The menu's name. |
|
The top-level links, in order. |
|
The link. |
|
The link type: |
|
True when the item links to the page being shown. Use it for |
|
True when the item or one of its descendants links to the page being shown. Use it to open or highlight the branch. |
|
Nested links, with the same fields. |
A deleted or unselected menu has no items. Render an empty item URL as a heading, not a link: labels and unavailable parent targets can still have usable children. Unavailable leaf links are omitted. Item titles use the requested locale with source-title fallback; target URLs use the current translated target slug. Menu names and handles are not translated. The same bound menu is available on product, collection and other page templates; menus have no dedicated page, SEO fields, images, facets or product counts. item_count counts all saved items, including hidden links and headings, rather than rendered links. Render children explicitly to the depth your placement supports.
Pickers#
product, collection, category, vendor, brand, page, blog_post and blog_category settings store the chosen item's id (rule settings.ids of the theme contract); a policy setting stores the policy's type (privacy, terms, ...), which every store shares, so it stays when the theme is installed. The template reads the item itself. A page setting resolves to the same fields as ctx.page (body included) and a policy setting to the same fields as ctx.policy. A blog_post setting resolves to the same post fields as ctx.blog.items and ctx.blog_post (id, url, title, slug, excerpt, featured_image as media, author, published_at, categories, tags, seo_title, seo_description, social_image, template_handle, noindex, metafields), without the post's body and comments; a blog_category setting resolves to the same fields as ctx.blog_category (id, url, name, slug, description, post_count, seo_title, seo_description, social_image, template_handle, noindex, metafields). A draft page or post, or a policy that is not shown (published with readable text in the shopper's language), resolves to nothing:
{% assign p = settings.product %}
{% if p %}
<a href="{{ p.url }}">
{% if p.featured_image %}<img src="{{ p.featured_image | image_url: width: 480 }}" alt="{{ p.featured_image.alt_text | default: p.title }}">{% endif %}
<span>{{ p.title }}</span>
{% if p.price %}<span>{{ p.price.current | money }}</span>{% endif %}
</a>
{% else %}
{{ "product-1" | placeholder_svg }}
{% endif %}
An item that was deleted or is not available on the storefront reads as nothing. Show a placeholder in that case. The fields of each item are listed in CTX.
Picked lists#
product_list and collection_list settings store several items in the merchant's order, up to max (12 if not set). The template reads a list of items; deleted items are left out.
{% if settings.products.size > 0 or design_mode %}
{% for p in settings.products %}
<article class="card"><a href="{{ p.url }}">{{ p.title }}</a></article>
{% else %}
<p class="card card--empty">{{ "product-1" | placeholder_svg }}</p>
{% endfor %}
{% endif %}
{% schema %}
{
"name": "featured-products",
"ctx_needs": ["design_mode"],
"settings": [
{ "id": "products", "type": "product_list", "max": 8,
"editor": { "label": "Products", "group": "content" } }
]
}
{% endschema %}
Dynamic sources#
In the editor, a merchant can connect a text or textarea setting to store data instead of typing a value, for example the current product's title. The template reads the live value, as text:
<h1>{{ settings.title }}</h1>
A dynamic source can use only data the section declares in ctx_needs, including metafields. When the data is missing, the setting is empty.