- Description:
This key defines which structures are available for Object inputs and Array inputs at a given level of the configuration cascade.
This key has no default.
If undefined at higher levels of the configuration cascade,
_structureswill default to any values configured in the CloudCannon configuration file.For more information, please read our documentation on structures.
- Appears in:
├── [*] │ └── _structures ├── create │ └── _structures ├── collections_config │ └── * │ ├── schemas │ │ └── * │ │ └── _structures │ └── _structures ├── file_config │ └── [*] │ └── _structures └── Snippet └── _structures- Type:
Object<Structure>- Values:
- Examples:
In this example, we want to populate an Array input in the
blogCollection with Related Articles, including thename,description, andurlfields.Copied to clipboardcollections_config: blog: _structures: related_articles: style: select values: - preview: text: - key: name subtext: - key: url value: name: description: url:{ "collections_config": { "blog": { "_structures": { "related_articles": { "style": "select", "values": [ { "preview": { "text": [ { "key": "name" } ], "subtext": [ { "key": "url" } ] }, "value": { "name": null, "description": null, "url": null } } ] } } } } }In this example, we want to populate an Array input with Staff members, including the
name,job_description, andprofile_picturefields for all staff types, and theurlfield for Managers only.Copied to clipboard_structures: staff: style: modal hide_extra_inputs: false values: - value: _type: Employee name: job_description: profile_picture: preview: text: - key: name - Employee subtext: - key: job_description - Description of position image: - key: profile_picture icon: support_agent - value: _type: Manager name: job_description: profile_picture: url: preview: text: - key: name - Manager subtext: - key: job_description - Description of position image: - key: profile_picture icon: face{ "_structures": { "staff": { "style": "modal", "hide_extra_inputs": false, "values": [ { "value": { "_type": "Employee", "name": null, "job_description": null, "profile_picture": null }, "preview": { "text": [ { "key": "name" }, "Employee" ], "subtext": [ { "key": "job_description" }, "Description of position" ], "image": [ { "key": "profile_picture" } ], "icon": "support_agent" } }, { "value": { "_type": "Manager", "name": null, "job_description": null, "profile_picture": null, "url": null }, "preview": { "text": [ { "key": "name" }, "Manager" ], "subtext": [ { "key": "job_description" }, "Description of position" ], "image": [ { "key": "profile_picture" } ], "icon": "face" } } ] } } }