- Created by Robert Reiner, last modified on 29. Mar 2022
projectdoc Toolbox
Renders a template with property references.
- Audience
- Categories
- Tags
- Type
This macro transcludes the values of properties of another document. The properties of the values to fetch are specified in a template.
Properties
Document
The document the properties are part of.
If not specified, the current document is used. This allows to render the value of a property of the same document at several places of this document, without duplicating the value.
Within the Document Properties Marker Macro
- you must not reference a property of the same document before it is defined. If you use this macro as the value of a document property, the macro must only reference properties that haven been specified prior.
- do not reference properties of pages with different page access restrictions!
Template
The template to add property references.
The placeholder ${...}
references a property value. The placeholder $[...]
references a property value and also generates a link to the referenced document. With $<...>
the property is rendered as is (as HTML).
The template defaults to
$[Name] - ${Short Description}
Since 4.13
Since version 4.13 the parameter supports to reference a space property. The name of the space property has to be prefixed with the paragraph sign ('§
').
For instance, if the value for the template parameter is specified by the space property my-select
, then the value of the template parameter is §my-select
.
Since 5.0
Since version 5.0.6 the parameter supports a selection of HTML tags to structure the template.
Supported inline elements
b
br
cite
code
dd
dt
em
i
li
q
small
span
strike
strong
sub
sup
u
Supported block elements
blockquote
dl
ol
p
pre
ul
Add Link
If checked, a link to the referenced document is rendered for the complete template text.
Lowercase Properties
List of property names whose values first letter should be lowercased.
Usually used for short descriptions.
Apply Space Properties
If checked the properties defined by the space of the document this macro is part of are applied as defaults.
Since these values are defaults they will only apply, if no document properties match.
Since 4.13
This parameter is available since version 4.13.
Calculate Expression
The content is an expression to be evaluated.
This property is available since version 1.7.0.
Use the Format Pattern to define the output format.
If the document has the properties X with a value of 23
and Y with a value of 42
.
If you want to calculate the average of these two values, use this pattern:
(${X} + ${Y}) / 2
The result: 32.5
Format Pattern
A format pattern to render an evaluated expression.
Since 1.7.0
This property is available since version 1.7.0.
Use the following symbols to define the pattern:
Symbol | Description |
---|---|
. | Decimal Separator |
0 | Digit |
# | Optional Digit |
, | Grouping Separator |
¤ | Currency Sign |
% | Multiply by 100 and show as percentage |
‰ | Multiply by 1000 and show as per mille value |
' | Quote strings (to escape symbols) |
Blank Placeholders
Controls the rendering of unresolved placeholders. Since unresolved placeholders may be further processed by transclusion macros (e.g. the Transclusion Macro), per default unresolved placeholders are rendered.
If this flag is checked, unresolved placeholders will not be rendered (blanked out).
Since 2.0
This property is available since version 2.0.
Default Value
A default value to render, if the document has no value for the template.
Prepend Newline
If checked, signals that a newline is to be rendered before the property template.
Render Mode
Specify how values from multiple documents are merged.
In case the values are drawn from multiple documents, typically by the use of Deep Links, then this parameter allows to control how the list of names is rendered.
Render Mode | Description |
---|---|
none | The content is rendered as is (default). |
text | The names are rendered in a comma-separated list. |
bullet | The names are rendered in a bullet list (the ul HTML element). |
numbered | The names are rendered in a bullet list (the ol HTML element). |
Since 5.0.8
This parameter is available since version 5.0.8 of the projectdoc Toolbox.
Identifier
Unique identifier of the macro for the rendered context.
Features may supply default configurations dependent on the value of this property.
Since 4.0
This parameter is available since version 4.0 of the projectdoc Toolbox.
Identifier Classes
Identifiers to address this macro as part a group for the rendered context.
Features may supply default configurations dependent on the value of this property.
Since 4.0
This parameter is available since version 4.0 of the projectdoc Toolbox.
Autocomplete Space Closure
Define the scope to search for documents in the Autocomplete context.
Only documents within this scope will be accepted by the Autocomplete for the Documents parameter.
Further constraints on the space can be declared by the use of the Autocomplete Constraints parameter.
Default space is the delegate space of the current space.
Since 4.3
This parameter is available since version 4.3 of the projectdoc Toolbox.
Before this the space closure could not be changed from its default delegate space.
This property is only used in the context of the Autocomplete function. It is only enforced on Autocomplete in the browser.
Changes to the parameter value will only take effect on the next Autocomplete selections. But there is also no guarantee that the list of selected documents will not be filtered later. The not enforced constraint is that the selected documents should match the constraints.content
Autocomplete Constraints
Provide a Where clause to select on documents for the autocomplete feature of this macro.
This parameter is only to control the autocomplete feature of this macro. If empty, no constraints are put on the list documents presented.
Since 4.0
This parameter is available since version 4.0 of the projectdoc Toolbox.
This property is only used in the context of the Autocomplete function. It is only enforced on Autocomplete in the browser.
Changes to the parameter value will only take effect on the next Autocomplete selections. But there is also no guarantee that the list of selected documents will not be filtered later. The not enforced constraint is that the selected documents should match the constraints.content
Details
Information on using this macro.
Tiling
Since version 5.0.6 this macro supports rendering block elements, also known as tiling.
Prior to that version block elements could be rendered, but will add additional spacing on top and bottom of the rendered content.
The macro cannot prevent to put empty paragraphs on top and bottom of the element. The following CSS may remove these empty elements and reduce spaces.
div.content-wrapper > p:empty { display: none; }
Related macros
- Display Document Property As Image Macro
- Renders the value of a document property as an image. The property value is required to an URL that points to an image.
- Display Document Property As Link Macro
- Renders the value of a document property as a link with an alternative label.
- Display Document Property As List Macro
- Renders the list value of a document property.
- Display Document Property Macro
- Renders the value of a property of a document.
- Display Document Property Ref Concat Macro
- Displays a single property of a document that is referred by a property of another document and concatenates it with the value of a local property.
- Display Document Property Ref Macro
- Displays a document property from a referenced document.
- Display Space Attribute Macro
- Renders a space attribute value.
- Display Space Property Macro
- Renders a space property value.
- Tour Macro
- Renders a predefined list of documents in a table.
Resources
- Linking to Glossary Terms
- Show how to use the Name List Macro to render links to glossary terms.