Skip to main content

metaobject_system

Basic information about a metaobject. These properties are grouped under the system object to avoid collisions between system property names and user-defined metaobject fields.

Properties

The unique handle of the metaobject.

The ID of the metaobject.

The type of the metaobject definition.

This is a free-form string that's defined when the metaobject definition is created.

The relative URL of the metaobject.

Only set for metaobjects that have the online_store capability.

Anchor to Using the `metaobject_system` object

Using the metaobject_system object

You can access the metaobject_system object and its properties through the metaobject's system property. You can use the following syntax:

{{ metaobjects.testimonials["home_page"].system.id }}

You can also access metaobject_system properties when iterating over a list of metaobjects:

{% for metaobject in product.metafields.custom.mixed_metaobject_list.value %}
{% if metaobject.system.type == "testimonial" %}
{% render 'testimonial' with metaobject as testimonial %}
{% else %}
{{ metaobject.system.handle }}
{% endif %}
{% endfor %}
Was this section helpful?