metaobject_ definition
A defines the structure of a metaobject type for the store, which consists of
a merchant-defined set of field definitions.
One or more corresponding metaobject objects contain values for
the fields specified in the metaobject definition.
When looping through metaobjects by accessing them using individual handles (e.g., ),
you're limited to 20 unique handles per page and can't use pagination.
To iterate over more metaobjects, instead use the values property, which supports pagination up to 250
entries per page.
When looping through metaobjects by accessing them using individual handles (e.g., ),
you're limited to 20 unique handles per page and can't use pagination.
To iterate over more metaobjects, instead use the values property, which supports pagination up to 250
entries per page.
Note: When looping through metaobjects by accessing them using individual handles (e.g., <code><span class="PreventFireFoxApplyingGapToWBR">metaobjects.T<wbr/>Y<wbr/>P<wbr/>E[handle]</span></code>), you're limited to 20 unique handles per page and can't use <a href="/docs/api/liquid/tags/paginate">pagination</a>. To iterate over more metaobjects, instead use the <code>values</code> property, which supports pagination up to 250 entries per page.
Properties
- valuesvaluesarray of metaobject
The metaobjects that follow the definition.
Loop over entries of a metaobject definition
If a metaobject definition has multiple metaobject entries, then you can loop over them using the values property.
You can loop over a maximum of 50 entries in a metaobject definition.
For example, you can display the field author for each metaobject using the following forloop:
{% for testimonial in metaobjects.testimonials.values %}
{{ testimonial.author.value }}
{% endfor %}
When the publishable capability is enabled, loops return only metaobjects with a status of active. Metaobjects with a status of draft are skipped.
When the publishable capability is enabled, loops return only metaobjects with a status of active. Metaobjects with a status of draft are skipped.
Note: When the <a href="/apps/data-extensions/metaobjects/capabilities"><code>publishable</code> capability</a> is enabled, loops return only metaobjects with a status of <code>active</code>. Metaobjects with a status of <code>draft</code> are skipped.