Reference Field Reference
fields.contentTemplate()
Embeds a single content template's fields inline.
Embeds a single content template's editors inline. Maps to editor { name: 'str-content-template', type: 'content-template' }. The stored value is the embedded template's data object.
Example
fields.contentTemplate({
label: 'Call to action',
template: 'cta-block',
})Options
| Option | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Label shown to editors in Strife Studio. |
template | string | Yes | The defineType name of the content template to embed. Compiled to wire attributes.templateId as the template's normalized (kebab-cased) name — the frontend resolves it by normalizedName, so no server-assigned GUID is required. |
description | string | No | Tooltip shown to editors. |
searchable | boolean | No | Include in the team's search index. |
filterable | boolean | No | Allow filtering content lists by this value. |
protected | boolean | No | Restrict editing to users with the appropriate permission. |
propertyName | string | No | Override the stored property name. |
No localizable option.
Output type
unknown from a bare Infer<> on the type that declares it — strife typegen resolves template to the embedded type's actual generated interface, so the generated read type is correctly typed even though the DSL-level Infer<> isn't (recursive item inference is a v2 concern, same as fields.chapters()).
See also
- Content Template — the same editor, documented from the Strife Studio UI side.