An overview over features employing placeholders to create a modular documentation.

Placeholders allow to define templates where transclusions supply context information that are inserted at render-time. This makes it possible to reuse a common form in multiple contexts. Transclusions support modular documentation and single sourcing.

 

There is another type placeholders used in blueprint wizards that are only applied during creation-time of a document. These placeholders are not addressed here.

For more information on this topic, please refer to Page Wizard Placeholder.

Defining Placeholders

Placeholders are defined in a document whose content is intended to be transcluded.

The projectdoc Toolbox supports two kinds of placeholders.

Simple Placeholders

A simple placeholder has a name and is delimited by a starting ${ and ends with a curly brace ('}').

${A simple placeholder}

Without transclusion simple placeholders are not replaced.

Simple placeholders are used by

Property References

A property reference is a macro that displays the value of a page or space property.

Properties are defined by the Document Properties Marker Macro and the Document Properties Supplier Macro.

Property placeholders simply render the value of a property. If a property is not defined an alternative value may be rendered which is specified with the macro.

Macros used to display the property values are

The query matched no documents.

Replacing Placeholders

This is the part were a fragment from another document is transcluded and placeholders are replaced with a value.

The projectdoc Toolbox supports placeholder replacements in three different ways.

Explicit Replacement

An explicit replacements defines the replacement values with the transclusion macro.

This is an example for placeholder replacements in the body of the Transclusion Macro or the Transclude Documents Macro:

product-name=projectdoc Toolbox
product-version=2.0

And this is an example of a fragment that defines the placeholders:

There current version of ${product-name} is ${product-version}.

Here is another example with the Transclusion Macro where a letter is created using placeholders.

Context Replacement

The context replacement uses the properties defined on the page, the space the page is part of, and to spaces and pages the space or page delegates to. All properties accessible from a given point are part of the replacement context.

The Code Block Placeholder Macro uses the properties information form the page and space. The Transclusion Macro and Transclude Documents Macro can be configured to also use this feature by checking Apply Document Properties.