Insert a single field value of a model object inline.
Field inserts a single field value of an object into the middle of a sentence. When the
field is missing or empty, the fallback value is used (if provided).
Supported props
| Prop | Type | Required | Default | Purpose |
|---|---|---|---|---|
model_key | string | yes* | current route model | Which model the object belongs to |
object | string | yes* | — | Object id, relative to the model |
name | string | no | — | Field to read (omit for primitive items) |
fallback | string | no | empty | Shown when the field is missing/empty |
* Inside Each, ObjectList, or ObjectTable
the current iteration item is used, so object and model_key are not required.
Example
PostgreSQL type: <Field model_key="deployment" object="iomodel.postgres" name="type" fallback="unknown" />Rendered: PostgreSQL type: unknown
Primitive items
When iterating with Each over="tags", each item is a primitive — read it with
name="value":
<Each model_key="deployment" object="iomodel.studio" over="tags">
<Field name="value" />
</Each>Common pitfalls
- Reading a field that does not exist returns empty — use
fallbackfor a default - For arrays (e.g.
tags) the value is rendered comma-separated
Last updated on