- Created by Robert Reiner, last modified on 08. Apr 2022
projectdoc Toolbox
Renders the value of a property of a document.
- Audience
- Categories
- Tags
- Type
This macro transcludes the value of a property of its own or another document.
Properties
Document
The document the property is 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!
Property Name
The name of the property to fetch the property value.
Add Link
If checked, a link to the referenced document is rendered.
CSS Classes
Provide a list of classes to be set for the rendered value.
The value will be rendered in a HTML-span element with this CSS class names added.
This parameter is available since version 2.0.
Match Pattern
Provide a regular expression to match with the property value. Define groups in the pattern to apply to placeholders in the Render Template.
The regular expression is passed to the Jave Regular Expression parser. For more information please refer to Class Pattern.
If the match pattern does not match, the property value is returned unaltered.
The following pattern matches with one group.
^\d\d\d ([^#]+) #\d+$
Use the parameter Render Template and refer to the group with ${1}
.
Since 4.5
This parameter is supported since version 4.5.
Render Template
Specify a template with placeholders of the form ${integer}
, to reference the groups matched with the Match Pattern.
The follwing render template refers to the first group matched with the matcher.
Reference ${1}
Since 4.5
This parameter is supported since version 4.5.
Since 5.0
Since version 5.0.6 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 select parameter is specified by the space property my-select
, then the value of the select 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
Append
Check if the Append Text is actually to be appended. If unchecked, the Append Text is prepended.
Additional Text
The text to be appended to the referenced property value.
Default Value
A default value to render, if the document has no value for the referenced property.
Prepend Newline
If checked, signals that a newline is to be rendered before the property value.
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 Properties Macro
- Renders a template with property references.
- 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 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.
Name | Short Description | Doctype |
---|---|---|
Deep Links in Queries | Deep links can be used on both sides of predicates in a Where Clause. | topic |
Display List Macro | Lists references to projectdoc documents in a list. List contain names and optional short descriptions. | macro |
Display List Template Macro | Lists references to projectdoc documents in a list. List items are defined by templates referencing properties. | macro |
Display Table Macro | Lists references to projectdoc documents in a table. Allows to select document properties for columns. Also non-list representations are provided. | macro |
Index Card Macro | Renders transcluded content fetched from documents of a result set. | macro |
Index Entries Table Macro | Renders a table of index entries. | macro |
Transclude Documents Macro | Renders transcluded content fetched from documents of a result set. | macro |
Resources
- Referencing Property Values
- Shows how to render the value of a document property with a display macro. There are actually three variants of this macro that we are discussion in this short article.
- Linking to Glossary Terms
- Show how to use the Name List Macro to render links to glossary terms.