Edit this topic

Documentation toc part

: request

: documentation-toc-part-handler

: documentation

: /modules/core/documentation/services/documentation-toc-part.js

: https://github.com/DecentCMS/DecentCMS/blob/master/modules/core/documentation/services/documentation-toc-part.js


Handler for a part that builds a table of contents for documentation. This depends on an index service to be active.

DocumentationTocPart.handle(context, done)

Build a shape for the TOC by querying the index for documentation topics.

Param Type Description
context object The context object.
context.part object The text part to handle.
context.partName string The name of the part.
context.displayType string The display type.
context.item object A reference to the content item.
context.shapes Array The shapes array to which new shapes must be pushed.
context.scope object The scope.
done function The callback.