> From the [Strife developer docs](https://strife.app/docs/reference/field-reference/fields.contenttemplate). Every page is listed in [llms.txt](https://strife.app/docs/llms.txt).

# 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

```ts
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`](https://strife.app/docs/reference/cli/typegen.md) 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()`](https://strife.app/docs/reference/field-reference/fields.chapters.md)).

## See also

* [Content Template](https://strife.app/docs/reference/fields/content-template.md) — the same editor, documented from the Strife Studio UI side.
