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_optionsType
Array<add_options[*]>
Items
This key represents an individual add option object in the collections_config.*.add_options array.
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.
Appears in: *.add_options.
Show examplesHide examples
In this example, we have configured a standard add option for the people Collection that uses the employee Schema and opens files in the Data Editor.
collections_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 team Collection browser has a link to the Office Locations page on our live website.
collections_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 people Collection. The first option uses the employee Schema, and the second option uses the contractor Schema and opens files in the Data Editor.
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{
"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 team Collection browser has a link to the Office Locations page on our live website.
collections_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"
}
]
}
}
}