This key defines the options for the View dropdown in the Collection browser.
The value is an array of view option strings. The first option listed is used as the default view.
Appears in
└── collections_config
└── *
└── view_optionsType
Array<view_options[*]>
Items
This key represents an individual view option string in the collections_config.*.view_options array.
The value is a string that specifies a view option for the View dropdown in the Collection browser. The first option listed is used as the default view.
Allowed values: card list gallery
Appears in: *.view_options.
Show examplesHide examples
In this example, we have configured a view option for the developer_articles Collection.
Copied to clipboard
collections_config:
developer_articles:
path: developer/articles
icon: article
view_options:
- card{
"collections_config": {
"developer_articles": {
"path": "developer/articles",
"icon": "article",
"view_options": [
"card"
]
}
}
}All items must be unique.
Examples
In this example, we have configured three view options for the developer_articles Collection, with card as the default view.
Copied to clipboard
collections_config:
developer_articles:
path: developer/articles
icon: article
view_options:
- card
- list
- gallery{
"collections_config": {
"developer_articles": {
"path": "developer/articles",
"icon": "article",
"view_options": [
"card",
"list",
"gallery"
]
}
}
}