As of October 2024, this documentation is only applicable to Sites using Unified Configuration. For Sites that have not migrated to Unified Configuration, please read the documentation on our non-unified documentation website.
You can use data files and folders to populate your Select and Multiselect inputs. Using a data file or folder to populate your value options is useful when you want your team members to be able to edit the available options.
Data files/folders (i.e., data_config
) are different to fixed data sets (i.e., _select_data
).
For more information about fixed data sets, please read our documentation on Select and Multiselect inputs.
You can define your data files and folder in the CloudCannon configuration file under the data_config
key.
To define a data file or folder:
- Navigate to your CloudCannon configuration file.
- Identify the
data_config
key at the root level of your configuration file, or add it if the key is not present. - Enter a key name for your data nested within the
data_config
key. - Add the
path
key within your data key and define the filepath to your data file or folder. - Save your changes.
Your data file or folder is now available for Select and Multiselect inputs configured with this data key.
Configure all data files or folders under the data_config
key in your CloudCannon configuration file.
Select and Multiselect inputs which use the authors
key are populated by the contents of the authors.csv
file.
Select and Multiselect inputs which use the offices
key are populated by the contents of each file in the offices
folder.
Configure all data files or folders under the data_config
key in your CloudCannon configuration file.
Select and Multiselect inputs which use the authors
key are populated by the contents of the authors.csv
file.
Select and Multiselect inputs which use the offices
key are populated by the contents of each file in the offices
folder.
Options#
Your data configuration has the following options available:
This key defines which file or folder data in your Site is available to populate Select and Multiselect inputs.
This key has no default.
This key defines the file or folder path for the data key in which it is nested.
The value for this key is relative to your Site source. Each Collection must have a unique path.
This key has no default.