Skip to content

Metaobject pages

Merchants define content types in Storefront › Custom content: a designer, a store location, a recipe. When a type is marked as having pages, each published entry gets a URL:

/<type>/<handle> for example /designers/layla-ahmad

Underscores in the type become dashes in the URL (store_location → /store-location/doha-mall).

The page uses templates/metaobject/<type>.json (or .liquid). Without that template, the URL is a 404.

templates/metaobject/designer.json
{ "sections": { "main": { "type": "main-designer" } }, "order": ["main"] }
sections/main-designer.liquid
<article class="page-width">
<h1>{{ metaobject.name }}</h1>
<p class="caption">{{ metaobject.city }}</p>
<div class="rte">{{ metaobject.bio }}</div>
</article>
{% schema %}{ "name": "Designer" }{% endschema %}

metaobject has id, handle, type and url, plus each field by its key. A field prints as its value; .value gives the typed value.

Was this page helpful?