Edit this topic

File content store

: shell

: content-store

: file-content-store

: /modules/core/content/services/file-content-store.js

: https://github.com/DecentCMS/DecentCMS/blob/master/modules/core/content/services/file-content-store.js


A content store that uses .json, .yaml, and .yaml.md files.

fileContentStore.loadItems(context, nextStore)

Loads the items from context.itemsToFetch that can be found in the store and puts the results on context.items.

Param Type Description
context object The context object.
context.scope object The scope.
[context.request] object The request.
context.itemsToFetch object The ids of the items to fetch are the property names on this object, and the values are arrays of callback functions to be called once the item has been loaded. Those callback functions should take an error and the item as their parameters.
context.items object The fetched items. Property names are ids, and values are the items themselves.
nextStore function The callback that will call into the next store. It should take an error as its parameter.