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

collections

Table of contents

Description:

This key defines the Collections displayed in a group in the Site Navigation.

The value is an array of Collection key name strings, matching the keys defined in collections_config.

This key is required for each group entry in the collection_groups array.

Appears in:
└── collection_groups
    └── [*]
        └── collections
Type:
Array<collections[*]> Required
Items:
[*]string#

This key represents an individual Collection key name string in the collection_groups.[*].collections array.

The value is a string that specifies the key name of a Collection defined in collections_config to include in a group in the Site Navigation.

Show examplesHide examples

In this example, we have configured a Collection group with multiple Collection key names in the collections array.

Copied to clipboard
collection_groups:
  - heading: Content
    collections:
      - pages
      - blog
  - heading: Data Files
    collections:
      - data
{
  "collection_groups": [
    {
      "heading": "Content",
      "collections": [
        "pages",
        "blog"
      ]
    },
    {
      "heading": "Data Files",
      "collections": [
        "data"
      ]
    }
  ]
}
Examples:

In this example, we have configured two Collection groups with collections arrays.

Copied to clipboard
collection_groups:
  - heading: Content
    collections:
      - pages
      - blog
  - heading: Data Files
    collections:
      - data
{
  "collection_groups": [
    {
      "heading": "Content",
      "collections": [
        "pages",
        "blog"
      ]
    },
    {
      "heading": "Data Files",
      "collections": [
        "data"
      ]
    }
  ]
}
Open in a new tab