☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

Configure the Add button in collections

Last modified: May 12th, 2026

CloudCannon provides a good default set of actions in the +Add menu in the collection file list. These actions are generated from schemas configured for that collection. If there are no schemas, actions are generated based on the first file in that collection.

You can override these default actions with the add_options option when configuring your collections.

You can make actions for the current collection, other collections, and external links.

Examples

Some example configurations are shown below:

Copied to clipboard
collections_config:
  posts:
    add_options:
      - name: Add Post
        editor: content
      - name: Add Draft
        editor: content
        collection: drafts
        schema: default
{
  "collections_config": {
    "posts": {
      "add_options": [
        {
          "name": "Add Post",
          "editor": "content"
        },
        {
          "name": "Add Draft",
          "editor": "content",
          "collection": "drafts",
          "schema": "default"
        }
      ]
    }
  }
}
Copied to clipboard
collections_config:
  pages:
    add_options:
      - name: New page
      - name: New contact page
        default_content_file: content/pages/contact.html
  people:
    add_options:
      - name: Add Staff Member
        schema: staff
      - name: Add Author
        icon: edit
        schema: author
        base_path: authors
    schemas:
      staff:
        path: schemas/staff.json
      author:
        path: schemas/author.json
  offices:
    add_options:
      - name: Add Office
        editor: data
      - name: Add Office Location
        icon: public
        href: edit?editor=data&path=_data/office-locations.yml
      - name: Open external link
        icon: search
        href: https://www.example.com/
{
  "collections_config": {
    "pages": {
      "add_options": [
        {
          "name": "New page"
        },
        {
          "name": "New contact page",
          "default_content_file": "content/pages/contact.html"
        }
      ]
    },
    "people": {
      "add_options": [
        {
          "name": "Add Staff Member",
          "schema": "staff"
        },
        {
          "name": "Add Author",
          "icon": "edit",
          "schema": "author",
          "base_path": "authors"
        }
      ],
      "schemas": {
        "staff": {
          "path": "schemas/staff.json"
        },
        "author": {
          "path": "schemas/author.json"
        }
      }
    },
    "offices": {
      "add_options": [
        {
          "name": "Add Office",
          "editor": "data"
        },
        {
          "name": "Add Office Location",
          "icon": "public",
          "href": "edit?editor=data&path=_data/office-locations.yml"
        },
        {
          "name": "Open external link",
          "icon": "search",
          "href": "https://www.example.com/"
        }
      ]
    }
  }
}

For the offices collection, this will result in the following menu:

A closeup of the Offices collection Add dropdown shows options for Add Office, Add Office Location, and Open external link.

Options

Each add_options entry has the following options:

This key defines a path for files created using an option in the + Add button dropdown.

This path overrides the path for the current Collection and subfolder open in the Collection browser.

This key is useful if you need to specify a specific subfolder within a Collection.

Appears in: Add Option.

Show examplesHide examples

In this example, we want team members in the _posts Collection to create new files in theblog subfolder of the _drafts Collection rather than the current Collection browser they have open. By configuring the base_path value to /../_drafts/blog, new files will be created in a different Collection subfolder (i.e., _drafts) when a team member selects this option from the + Add button dropdown.

Copied to clipboard
collections_config:
  _posts:
    add_options:
      - name: Add draft blog
        icon: post_add
        editor: content
        base_path: /../_drafts/blog
{
  "collections_config": {
    "_posts": {
      "add_options": [
        {
          "name": "Add draft blog",
          "icon": "post_add",
          "editor": "content",
          "base_path": "/../_drafts/blog"
        }
      ]
    }
  }
}

This key defines the Collection for files created using an option in the + Add button dropdown.

This Collections overrides the current Collection open in the Collection browser.

The value for this key should be the key name of a Collection.

By default, this key is the current Collection open in the Collection browser.

Appears in: Add Option.

Show examplesHide examples

In this example, we want team members in the articles Collection to create new files in the new_articles Collection rather than the current Collection browser they have open. By configuring the collection value to new_articles, new files will be created in a different Collection (i.e., new_articles) when a team member selects this option from the + Add button dropdown.

Copied to clipboard
collections_config:
  articles:
    add_options:
      - name: Add articles
        collection: new_articles
        schema: articles
{
  "collections_config": {
    "articles": {
      "add_options": [
        {
          "name": "Add articles",
          "collection": "new_articles",
          "schema": "articles"
        }
      ]
    }
  }
}

This key defines which file CloudCannon should use to populate a file created with an option in the + Add button dropdown.

The value is a string that specifies a file path relative to the root of your repository. This file is used to populate the initial contents of a new file if the Collection defined in add_options.collection has no Schemas configured.

The add_options.schema key will override default_content_file if configured.

Appears in: Add Option.

Show examplesHide examples

In this example, we want CloudCannon to populate the initial contents of new files with event_template.yml.

Copied to clipboard
collections_config:
  events:
    add_options:
      name: Add new event
      collection: upcoming_events
      default_content_file: event_template.yml
{
  "collections_config": {
    "events": {
      "add_options": {
        "name": "Add new event",
        "collection": "upcoming_events",
        "default_content_file": "event_template.yml"
      }
    }
  }
}
editorstring#

This key defines which editing interface CloudCannon will use when you select an option from the + Add button dropdown.

Values can be one of the following: visual, content, or data.

By default, CloudCannon will open the new file in an appropriate editing interface for that file type.

If CloudCannon cannot determine an appropriate editing interface, it will show a warning.

Allowed values: visual content data

Appears in: Add Option.

Show examplesHide examples

In this example, we have configured a standard add option for the people Collection that opens new files in the Data Editor.

Copied to clipboard
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"
        }
      }
    }
  }
}
hrefstring Required#

This key defines the link for a URL option in the + Add button dropdown.

The value is a string that specifies a URL. Values can be an external URL or an internal URL relative to the current Site.

This key is required for URL add options in the collections_config.*.add_options array.

Appears in: HREF Add Option.

Show examplesHide examples

In this example, the + Add button dropdown in the team Collection browser uses a link option with the URL https://forms.gle/xxxxxxx.

Copied to clipboard
collections_config:
  team:
    add_options:
      - name: Submit Form
        icon: assignment_add
        href: https://forms.gle/xxxxxxx
{
  "collections_config": {
    "team": {
      "add_options": [
        {
          "name": "Submit Form",
          "icon": "assignment_add",
          "href": "https://forms.gle/xxxxxxx"
        }
      ]
    }
  }
}
iconstring#

This key defines the icon displayed next to the text for a standard add option in the + Add button dropdown.

The value is a string that specifies an icon name from Google's Material Symbols.

By default, this key uses the icon of the matching Schema if add_options.schema is configured. Otherwise, this key defaults to add.

Allowed values: 123 360 10k 10mp 11mp 12mp 13mp 14mp 15mp 16mp and 3574 more.

Appears in: Add Option.

Show examplesHide examples

In this example, we have configured a standard add option for the people Collection with the custom icon support_agent.

Copied to clipboard
collections_config:
  people:
    add_options:
      - name: Add Contractor
        icon: support_agent
        schema: contractor
        editor: data
    schemas:
      contractor:
        path: /.cloudcannon/schemas/contractor.yml
{
  "collections_config": {
    "people": {
      "add_options": [
        {
          "name": "Add Contractor",
          "icon": "support_agent",
          "schema": "contractor",
          "editor": "data"
        }
      ],
      "schemas": {
        "contractor": {
          "path": "/.cloudcannon/schemas/contractor.yml"
        }
      }
    }
  }
}
namestring#

This key defines the text displayed for a standard add option in the + Add button dropdown.

The value is a string that specifies the label text for the menu item.

By default, this key uses the name of the matching Schema if add_options.schema is configured. Otherwise, this key has no default value.

Appears in: Add Option.

Show examplesHide examples

In this example, we have configured a standard add option for the people Collection with the custom name "Add Staff Member".

Copied to clipboard
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"
        }
      }
    }
  }
}
schemastring#

This key defines which Schema CloudCannon should use to populate a file created with a standard add option in the + Add button dropdown.

The value is a string that specifies the key name of a Schema defined in schemas to use as the default content for the new file.

Configuring this key will override add_options.default_content_file.

By default, this key uses the default Schema in the Collection configured in add_options.collection (or the containing collection if collection is not specified), if Schemas are configured for that collection. Otherwise, this key has no default value.

Appears in: Add Option.

Show examplesHide examples

In this example, we have configured a standard add option for the people Collection that uses the employee Schema to populate new files.

Copied to clipboard
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"
        }
      }
    }
  }
}

Related Resources

Open in a new tab