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 type of the metaobject definition.
This is a free-form string that's defined when the metaobject definition is created.
Returned by
Anchor to Using the `metaobject_system` object
Using the metaobject_system
object
metaobject_system
objectYou can access the 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 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?