Edit this topic

Content path mapper

: shell

: id-to-path-map

: file-content-store

: /modules/core/content/services/content-path-mapper.js

: https://github.com/DecentCMS/DecentCMS/blob/master/modules/core/content/services/content-path-mapper.js

class: ContentPathMapper

new ContentPathMapper()

Maps a content item's id to the list of file paths that could possibly have descriptions of the item.

contentPathMapper.mapIdToPath(root, id) ⇒ Array.<string>

Maps a content item's id to the list of file paths that could possibly have descriptions of the item.

Returns: Array.<string> - The list of possible paths for a file describing the item.

Param Type Description
root string The content root for this item (content, widget, etc.).
id string The item's id under the root.