This key defines custom order and grouping for Collections in your Site Navigation.
The value is an array of group objects. Each group object must contain a heading key and a collections key.
If undefined, CloudCannon will sort your Collections in the order they are defined under the collections_config key.
Type
Array<collection_groups[*]>
Items
This key represents an individual group entry in the collection_groups array.
The value defines a group of Collections displayed in the Site Navigation. Each group entry must contain a heading key and a collections key.
Appears in: collection_groups.
Show examplesHide examples
In this example, we have configured two Collection groups with a heading and collections array.
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 Collection groups to organize Collections into "Content" and "Data Files" sections in the Site Navigation.
collection_groups:
- heading: Content
collections:
- pages
- blog
- heading: Data Files
collections:
- data{
"collection_groups": [
{
"heading": "Content",
"collections": [
"pages",
"blog"
]
},
{
"heading": "Data Files",
"collections": [
"data"
]
}
]
}