- Created by Robert Reiner, last modified on 12. Sep 2022
projectdoc Toolbox
Access sections from aspect documents.
- Audience
- Tags
- Categories
- Since
- 4.0
This macro uses supplied sections from aspect documents.
Aspect Support
This is basically a pre-configured version of the Transclusion Reference Macro to make the use of Aspects easier.
In case you need more control over the from of incorporating sections, replace this specialized macro with the generic version.
Properties
Target Heading Level
Specifies the new base level of the transcluded fragment. The top-level heading will be set to this level and subsections are transformed accordingly.
This modifier allows to render a section with subsections within another page adjusted to the target's heading level.
If the target heading level is set to 2 and the top-level heading is a h1, each heading within the transcluded fragment is incremented by one.
We are referring to the projectdoc Section Macro, not the Confluence Section Macro.
The Target Heading Level may be set to '*'. In this case the level is calculated depending on the location of the macro. If the parent is a section at level X, the target level will be set to X+1.
Tip on Heading Level Transposition
The tip Heading Level Transposition provides an example on how this feature is used.
Select
Specify a comma-separated list of page properties from the transcluded document to be rendered in a table. You may also specify section names.
Use Deep Link to select a property from a referenced document in the Select Clause.
Name, Audience->Group, Audience
The table header can be replaced using the Header Translations parameter by most macros
Audience->Group=Group Name
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 select parameter is specified by the space property my-select
, then the value of the select parameter is §my-select
.
Header Translations
Comma-separated list of key value pairs. Key is the header to be replaced by the value. Format: k1=v1, k2=v2.
Use this parameter if the name of the property is not appropriate as the column header.
The default label '#' may be overridden locally like this:
#=Counter
The label of all number column headings is also controlled by a space property named Counter Column Header.
Force Show
If checked then content that is hidden in its original location is shown.
This effectively overrides the hide parameter of a Section Macro or Content Marker Macro.
Render Reference Box
If checked, a box that marks the transcluded text is rendered with a link to the part in the document (if the transcluded part is uniquely identifiable).
Here is an example of transcluded content from an example page named "A Document":
If you click on the name you jump to the document of the transcluded content.
A transclusion box is a handle, typically only available to users who actually have write access to a page, to quickly jump to the page from which content is transcluded.
The rendering can be controlled via space property render-transclusion-box
.
The following values are valid:
only-with-edit-permission
The reference box is only rendered, if the user has edit permission. That is the user is an other and benefits from the clue of transcluded content.
never
- The reference box is never rendered. This may proof useful for authors that want to check the appearance without boxes.
Live Templates with Impersonator
The impersonator box has edges on the upper left and lower right corner.
Apply Document Properties
If Apply Document Properties is checked properties of the document and space are applied as placeholders.
Extract Short Description
If the transclusion renders properties of the transcluded document (see Select), the state of this checkbox controls the rendering of the Short Description property. If checked the short description is rendered on top of the table showing the properties. If unchecked the description is rendered as a key/value property in the properties table.
No Cache
If checked the macro will not use the page fragment cache to calculate the transcluded page fragment.
This does only apply if the space is using the transclusion cache. Otherwise the state of the checkbox has no effect.
This parameter is available since version 1.9.0.
If the macro uses placeholders, caching will automatically switched off.
Identifier
The identifier is rendered with the encosing HTML element.
It is also useful to uniquely identify the macro in a page.
This parameter is available since version 1.12.0.
Identifier Classes
Apply identifier classes to render this macro as part of a group.
This identifier is used for Remote Control and Context Controlled Macros. Multiple macros on a page may have only one unique Identifier, but may share common identifier classes.
Context controlled
When checked configures parameters via document and space properties.
For more information please refer to Context Controlled Macros.
Macro Body
Specify the replacements in the macro's body.
The transcluded content may specify placeholders in the form ${placeholder-name}
.
Placeholder/replacement pairs identify the placeholder to be replaced by its name and content for the replacement of the placeholder.
Before version 4.8 the body of the macro only accepts plain text. Therefore only plain text replacements were supported.
Since version 4.8 the body accepts rich text. Users may specify replacements in both forms.
Plain Text Replacements
Switch the body to preformatted and specify key/value pairs in plain text form.
Here is a sample key/value list in text form.
placeholder-name=Replacement 1 Another Placeholder Name=Replacement Text Two
Everything before the first equal sign ('=
') is considered to be the key for the placeholder, everthing after the equal sign up to the end of the line is the value.
This is an example for placeholder replacements in the body:
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}.
Rich Text Replacements
To replace a placeholder with an HTML element, add a table with two columns.
Only lines with table data are parsed. The table header is purely to guide authors and may not be specified at all.
Related Macros
The following macros relate to use Aspects with the projectdoc Toolbox.
- Aspect Properties Macro
- Access properties from aspect documents.
- Aspect References Macro
- Autoconnect to aspect documents.
Resources
- Aspect
- An aspect is a document attached to another document to supply properties and sections. Aspects support modular documentation while the information can be still accessed in one document.
- Aspects
- Tools and information elated to the Aspects Feature of the projectdoc Toolbox.
- Using Aspects
- Add a document as a child and automatically make supplied properties and sections available in the parent. A short walk-through to use the Aspect Feature in your information architecture.
- Transclusion Reference Macro
- Transcludes content via a reference from a document marked with the content marker macro.