You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/content/docs/beta-features.md
-90
Original file line number
Diff line number
Diff line change
@@ -9,96 +9,6 @@ We run new functionality in an open beta format from time to time. That means th
9
9
10
10
11
11
12
-
13
-
14
-
15
-
16
-
## List Widget: Variable Types
17
-
18
-
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.
19
-
20
-
**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.**
21
-
22
-
To use variable types in the list widget, update your field configuration as follows:
23
-
24
-
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.
25
-
2. Each field definition under `types` must use the `object` widget (this is the default value for
26
-
`widget`).
27
-
28
-
### Additional list widget options
29
-
30
-
*`types`: a nested list of object widgets. All widgets must be of type `object`. Every object widget may define different set of fields.
31
-
*`typeKey`: the name of the field that will be added to every item in list representing the name of the object widget that item belongs to. Ignored if `types` is not defined. Default is `type`.
32
-
*`summary`: allows customization of a collapsed list item object in a similar way to a [collection summary](/docs/configuration-options/?#summary)
33
-
34
-
### Example Configuration
35
-
36
-
The example configuration below imagines a scenario where the editor can add two "types" of content,
37
-
either a "carousel" or a "spotlight". Each type has a unique name and set of fields.
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.
8
+
9
+
**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.**
10
+
11
+
To use variable types in the list widget, update your field configuration as follows:
12
+
13
+
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.
14
+
2. Each field definition under `types` must use the `object` widget (this is the default value for
15
+
`widget`).
16
+
17
+
### Additional list widget options
18
+
19
+
*`types`: a nested list of object widgets. All widgets must be of type `object`. Every object widget may define different set of fields.
20
+
*`typeKey`: the name of the field that will be added to every item in list representing the name of the object widget that item belongs to. Ignored if `types` is not defined. Default is `type`.
21
+
*`summary`: allows customization of a collapsed list item object in a similar way to a [collection summary](/docs/configuration-options/?#summary)
22
+
23
+
### Example Configuration
24
+
25
+
The example configuration below imagines a scenario where the editor can add two "types" of content,
26
+
either a "carousel" or a "spotlight". Each type has a unique name and set of fields.
0 commit comments