Child pages
  • Context Controlled Macros


A context controlled macro uses properties from its context to control the content being rendered. This includes document and space properties.

Relation

Context controlled macros check properties form their context to fetch macro parameter values. The identifier of the macro is used to identify properties from the document, the document parent hierarchy and the space to use their values as parameter values.

The format of the property name to select its values as a parameter value is id:parameter-name.

This feature is useful for use cases where the macros is configured by the context. This makes these macros easily be configured by properties and share configuration.

Since 3.1

 

This feature is available since projectdoc Toolbox 3.1.

Supporting Macros

A number of macros from the projectdoc Toolbox support being controlled by their context:

Display List Macro
Lists references to projectdoc documents in a list. List contain names and optional short descriptions.
Display List Template Macro
Lists references to projectdoc documents in a list. List items are defined by templates referencing properties.
Display Table Macro
Lists references to projectdoc documents in a table. Allows to select document properties for columns. Also non-list representations are provided.
Index Entries Table Macro
Renders a table of index entries.
Tour-by-Property Macro
Renders a predefined list of documents in a table . Documents are selected by a document property. Allows to select document properties for columns. Also non-list representations are provided.
Transclude Documents Macro
Renders transcluded content fetched from documents of a result set.
Transclusion Macro
Transcludes content from a document marked with the content marker macro.
Transclusion Reference Macro
Transcludes content via a reference from a document marked with the content marker macro.
Transclusion to Text Macro
Transcludes content from a document marked with the content marker macro and renders it as plain text.

Resources

More information on remote controlled documents.

Remote Control
Changing the rendered contents of a projectdoc document dynamically for each request.
Use Context Controlled Macros
A collection of macros supports dynamic parameters that may be controlled remotely or by their context. This tip provides some information on context controlled macros.