Repeat a template per object, or per a single object's links/tags/attributes.
Each repeats its body once per item, exposing the current item to Field,
ObjectLink, and If. Write the body once (the per-item
template) — the component does the iteration.
Supported props
| Prop | Type | Required | Default | Purpose |
|---|---|---|---|---|
model_key | string | yes* | current route model | Which model to read |
objects | string | no | ** | Id mask for iterating over objects |
object | string | no | — | Source object id when iterating a collection |
over | string | no | objects | links, tags, or attributes of object |
* Set model_key explicitly on specs pages.
Iterate over objects
<Each model_key="deployment" objects="iomodel.*">
<ObjectLink /> — <Field name="type" />
</Each>Rendered output:
Iterate over a collection of one object
Set object and over. Field names depend on the collection:
over | Item fields |
|---|---|
links | label, target (target id), type, description |
tags | value |
attributes | key, value |
<Each model_key="deployment" object="iomodel.studio" over="links">
<Field name="label" /> → <Field name="target" />
</Each>Rendered output:
Common pitfalls
Eachcannot be nested in anotherEach/ObjectList/ObjectTableobjects="*"matches one level only — use**for nested objectsoverrequiresobject(the source object whose collection is iterated)
Last updated on