projectdoc Toolbox

Passes a text containing placeholders to the Code Block Macro. The placeholders are replaced by the properties of a document and/or the space properties.

Categories
Tags

The Code Block Placeholder Macro passes its content to the Code Block Macro, after placeholders have been replaced with values from the referenced document's properties and/or space properties.

The placeholders in of form ${property name}.

The example above shows how placeholder reference properties from the current document (Props) and space properties. The content is then formatted by the Code Block Macro.

 

Since version 2.0 there is a very simple escape mechanism. Place a single '\' in front of the '${' and the replacement will not take place. A second backslash in front will escape the backslash and disable the escaping.

Assume that name is associated with the value 'value'.

InputResolves to
${name}value
\${name}${name}
\\${name}\\value

Properties

Document

The document to fetch property values for the placeholders. If not specified, the current document is used.

Apply Space Properties

If checked the properties defined by the space of the document this macro is part of are applied as defaults.

 

Since version 1.13 also space property templates are resolved. A space property value may contain a space property placeholder that is resolved before it is inserted for the placeholder specified in the body of this macro.

Document properties do not support placeholders. If a property with a placeholder is encountered it will be rejected if a space property for the same key is given. You can override this by the use of the property control  is-no-template.


Code Language

This value is passed to the Code Block Macro.

The value "Default Language" refers to the value provided by the space property "Code Language".

Code Title

This value is passed to the Code Block Macro.

Code Theme

This value is passed to the Code Block Macro.

Code Line Numbers

This value is passed to the Code Block Macro.

Code First Line

This value is passed to the Code Block Macro.

Code Collapse

This value is passed to the Code Block Macro.