Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleReplacing 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.

Section
titleExplicit 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:

Code Block
languagetext
product-name=projectdoc Toolbox
product-version=2.0

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

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

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

Section


Column


Column




Section
titleContext 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.


Section
hidetrue
titleImpersonator

The impersonator feature, available since version 1.13 of the projectdoc Toolbox, allows to use property references in transclusion by replacing the owning document. Usually a page is rendered in its own context. With an impersonator the page will rendered in the context of the transcluding page.

Example Box

Assume there is a page that renders the value of its property 'A' in one of its sections. If the section is transcluded by another page that impersonates the page, the value rendered will be of the impersonating page instead of the transcluded page.

ModeValue of Property
ImpersonatingTranscluding Page
Not ImpersonatingTranscluded Page


The Transclusion Macro provides a property to define the impersonating page.

Note Box

Currently this feature is under development. Track it under

Jira
serversmartics JIRA
serverId79ad43bc-d289-364e-bfc7-46c09847bebd
keyPDAC-663
.



...