Categories
The categories are normally used together with the routing system to represent the idiomatic department structure in a newspaper. Read our Setup Categories Guide for more infos on the actual use cases.
You can define an array of available categories in your project config. The schema looks as follows:
1
// projectConfig.categories: [{...}]
2
ms.arrayOf(ms.strictObj({
3
id: 'string:required',
4
label: 'string:required',
5
path: 'string:required',
6
parent: 'string',
7
archived: 'boolean',
8
metadata: ms.obj()
9
}))
Copied!
Categories can have a path for the routing. They should never be deleted but the archived flag set to true. Categories have a metadata object that contain additional information such as ad campaign ids for a certain category (e.g. ads specific to the "Sports" category).
Last modified 1yr ago
Copy link