- Description:
This key defines the options available in the + Add button dropdown at the top right of your Collection browser.
Configuring add options for a Collection will remove CloudCannon's default "Add a file" option from the + Add button dropdown.
Additionally, any Schemas you have configured for a Collection will also appear in the + Add dropdown.
- Appears in:
└── collections_config └── * └── add_options- Type:
Array<add_options[*]>- Items:
This key represents an individual add option object in the
collections_config.*.add_optionsarray.The value is an object that defines an option available in the + Add button dropdown at the top right of the Collection browser. Each add option can be a standard entry or a URL entry, each with their own properties.
Show examplesHide examples
In this example, we have configured a standard add option for the
peopleCollection that uses theemployeeSchema and opens files in the Data Editor.Copied to clipboardcollections_config: people: add_options: - name: Add Staff Member schema: employee icon: face editor: data schemas: employee: path: /.cloudcannon/schemas/employee.yml{ "collections_config": { "people": { "add_options": [ { "name": "Add Staff Member", "schema": "employee", "icon": "face", "editor": "data" } ], "schemas": { "employee": { "path": "/.cloudcannon/schemas/employee.yml" } } } } }In this example, the + Add button dropdown in the
teamCollection browser has a link to the Office Locations page on our live website.Copied to clipboardcollections_config: team: add_options: - name: Office Locations icon: map href: /our-offices{ "collections_config": { "team": { "add_options": [ { "name": "Office Locations", "icon": "map", "href": "/our-offices" } ] } } }- Examples:
In this example, we have configured two standard add options for the
peopleCollection. The first option uses theemployeeSchema, and the second option uses thecontractorSchema and opens files in the Data Editor.Copied to clipboardcollections_config: people: add_options: - name: Add Staff Member schema: employee icon: face editor: data - name: Add Contractor icon: support_agent schema: contractor editor: data schemas: employee: path: /.cloudcannon/schemas/employee.yml contractor: path: /.cloudcannon/schemas/contractor.yml{ "collections_config": { "people": { "add_options": [ { "name": "Add Staff Member", "schema": "employee", "icon": "face", "editor": "data" }, { "name": "Add Contractor", "icon": "support_agent", "schema": "contractor", "editor": "data" } ], "schemas": { "employee": { "path": "/.cloudcannon/schemas/employee.yml" }, "contractor": { "path": "/.cloudcannon/schemas/contractor.yml" } } } } }In this example, the + Add button dropdown in the
teamCollection browser has a link to the Office Locations page on our live website.Copied to clipboardcollections_config: team: add_options: - name: Office Locations icon: map href: /our-offices{ "collections_config": { "team": { "add_options": [ { "name": "Office Locations", "icon": "map", "href": "/our-offices" } ] } } }