Skip to content

Commit

Permalink
present variable object types
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjagodic committed Aug 29, 2024
1 parent d62a13f commit fff1528
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content/docs/variable-type-widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ group: Fields
weight: 30
---

Before this feature, the [list widget](/docs/widgets/#list) allowed a set of fields to be repeated, but every list item had the same set of fields available. With variable types, multiple named sets of fields can be defined, which opens the door to highly flexible content authoring (even page building) in Decap CMS.
Before this feature, the [list widget](/docs/widgets/#list) and [object widget](/docs/widget/#object) allowed a set of fields to be repeated, but every list item had the same set of fields available. With variable types, multiple named sets of fields can be defined, which opens the door to highly flexible content authoring (even page building) in Decap CMS.

**Note: this feature does not yet support default previews and requires [registering a preview template](/docs/customization#registerpreviewtemplate) in order to show up in the preview pane.**

There is a limitation - dependent fields must be nested under an object or list.

To use variable types in the list widget, update your field configuration as follows:

1. Instead of defining your list fields under `fields` or `field`, define them under `types`. Similar to `fields`, `types` must be an array of field definition objects.
Expand Down

0 comments on commit fff1528

Please sign in to comment.