Sale price  €0,00 Regular price  €1.000,00

To display all metaobject entries on your Shopify site:

  1. Go to Online Store > Themes > Actions > Edit code.

  2. In Templates, create page.metaobjects-list.liquid with this code (replace custom.your_metaobject_type with your metaobject's namespace.type):

    <div class="metaobjects-list">
      {% assign mo_def = shop.metaobjects.custom.your_metaobject_type %}
      {% for entry in mo_def.values %}
        <a href="/pages/{{ mo_def.type_handle }}--{{ entry.handle }}">
          {{ entry.title.value }}
        </a>
      {% endfor %}
    </div>
  3. Create a page in Online Store > Pages, assign the metaobjects-list template.

  4. Link the page in your navigation.

This loops up to 50 entries; for more, use the Storefront API.

 

— Make it into a block with configurable fields for reuse

You may also like