Dynamic sources and metafields
Merchants define custom fields in Settings › Custom fields and fill them in on each product, collection or page: a subtitle, a care guide, a “made in” country. Themes read them as metafields.
Reading metafields
Section titled “Reading metafields”{%- assign subtitle = product.metafields.custom.subtitle -%}{%- if subtitle != blank -%} <p class="product__subtitle">{{ subtitle }}</p>{%- endif -%}resource.metafields.<namespace>.<key> is a metafield. It prints as its value; .value gives the typed value (a number, a list, a reference), and .type its type.
Metafields are on product, collection, page, article and shop.
Connecting settings (dynamic sources)
Section titled “Connecting settings (dynamic sources)”In Shopify, a merchant can connect a text setting to a metafield in the editor. Sooquna doesn’t offer this yet. Until it does, read the metafield in your section and fall back to the setting:
{{ product.metafields.custom.badge | default: block.settings.badge_text }}This works the same for every product and keeps the merchant’s text as the default.
Metaobjects
Section titled “Metaobjects”Entries of a custom content type (an author, a store location), managed in Storefront › Custom content, are metaobjects. They can have their own pages; see Metaobject pages. A metaobject setting lets a section pick one entry.
Was this page helpful?

