Collection-Content Data Source
8 min
overview the collection content data source fetches the contents of a specific curator collection from the catalog api it gives editorial teams direct control over what appears in a list — the items and their order are managed through the curator tool, not by api filters this is the correct replacement for the deprecated collection type when to use this use collection content whenever the list of items is manually curated by editors rather than algorithmically filtered typical use cases featured article slots, homepage highlights, manually ordered carousels, and any section where editorial teams manage the content list in curator basic example { "type" "collection content", "contextkey" "featured", "collectionid" "home featured", "batchsize" 10 } this loads the contents of the home featured collection and exposes them as $context featured the order and membership of items are controlled entirely by editors in the curator tool live example view /examples/datasources/collection content configuration type specific properties property type default description collectionid string — required the id of the collection to load content from filter object — optional additional filter applied on top of the collection contents filter properties filter key type description type value restrict items to a specific content type within the collection publicationid value further scope results if the collection spans multiple publications common configuration (inherited) all common data source properties apply — limit , offset , batchsize , contextkey , maxcacheage , etc for more details, see todo insert link to data sources overview link advanced features dynamic collection id from context the collectionid can be resolved from context to make a single view definition serve different collections { "type" "collection content", "contextkey" "items", "collectionid" "$context collection id" } for more details on value interpolation, see todo insert link to value interpolation link testing notes / edge cases collection must exist if the collectionid does not match a published collection in the catalog api, the data source returns an empty list with no error always verify the collection id matches exactly (case sensitive) editor controlled order unlike content , results are returned in the order editors placed them in curator sort overrides are not applicable if ordering seems wrong, check the curator configuration empty collection an empty collection returns zero items the ui should have an appropriate empty state limit vs collection size if limit is smaller than the number of items in the collection, only the first n items (in curator order) are shown this is intentional for "top n featured" patterns caching collection contents are cached after an editor updates a collection in curator, changes may not appear immediately depending on the maxcacheage setting do not use randomize with curated collections — it defeats the editorial ordering related topics todo insert link to data sources overview linktodo insert link to content data source linktodo insert link to value interpolation linktodo insert link to curator documentation link