- Description:
This key defines which key an option in the Sort dropdown should use to sort files in your Collection browser.
You must define this key for every entry in the
sort_optionsarray for the object to function.Value must be the name of a structured data key in your Collection files.
If some files in your Collection do not have this data key, CloudCannon will sort those in ascending alphabetical order, after the file sorted by your data key in the Collection browser.
- Appears in:
└── collections_config └── * └── sort_options └── [*] └── key- Type:
stringRequired- Examples:
In this example, the "Author (A-Z)" option in the Sort dropdown will use the
authorkey to sort files in theblogCollection browser.Copied to clipboardcollections_config: blog: sort_options: - key: author order: ascending label: Author (A-Z){ "collections_config": { "blog": { "sort_options": [ { "key": "author", "order": "ascending", "label": "Author (A-Z)" } ] } } }