Collections
Collections are registered with the collections
extension.
Callback definition
The collections
extension accepts an array of collections where the key is the name of the collection and the value a callback function that returns the collection.
File definition
Alternatively, you can require a file. The required file would be a collection with a return function.
Usage in templates
Once defined, you can use the collection in your templates using the collection()
helper.