Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Document clean process

...

Document Properties Marker
overridefalse


Short DescriptionAn overview over features employing placeholders to create a modular documentation. 
Doctypetopichide
NameUsing Placeholders 
Parent
Parent Property
propertyParent
property-nameName
 
Audience
Name List
doctyperole
render-no-hits-as-blanktrue
propertyAudience
 
Level of Experience

Name List
doctypeexperience-level
render-no-hits-as-blanktrue
names

Advanced Beginner

Competent
propertyLevel of Experience
empty-as-nonefalse

 
Expected Duration 
Subject
Name List
doctypesubject
propertySubject
 
Categories
Name List
doctypecategory
propertyCategories
 
Tags
Tag List
render-list-as-comma-separated-valuestrue
namesConfluence, projectdoc, transclusion, placeholders, modular documentation, single sourcing
propertyTags
 
Iteration
Iteration
valuefocused
hide
Type
Name List
doctypetopic-type
render-no-hits-as-blanktrue
namesTip
propertyType
 
Sponsors
Name List
doctypestakeholder
render-no-hits-as-blanktrue
propertySponsors
 
Sort Keyhide



Section
show-titlefalse
titleDescription

Placeholders allow to define templates where transclusions supply context information that are inserted at render-time. This makes it possible to reuse a common form in multiple contexts. Transclusions support modular documentation and single sourcing.

Caution Box

There is another type placeholders used in blueprint wizards that are only applied during creation-time of a document. These placeholders are not addressed here.

For more information on this topic, please refer to Page Wizard Placeholder.


...

Section
titleDefining Placeholders

Placeholders are defined in a document whose content is intended to be transcluded.

The projectdoc Toolbox supports two kinds of placeholders.

Supporting property references is in discussion for version 1

.

13: key

Simple placeholders are used by

Section
titleSimple Placeholders

A simple placeholder has a name and is delimited by a starting ${ and ends with a curly brace ('}').

Code Block
${A simple placeholder}

Without transclusion simple placeholders are not replaced.

Note Box
Jira
serversmartics JIRA
serverId79ad43bc-d289-364e-bfc7-46c09847bebd
PDAC-671
Display Properties
documentTransclusion Macro
  • Display Properties
    documentCode Block Placeholder Macro

  • Section
    titleProperty References

    A property reference is a macro that displays the value of a page or space property.

    Properties are defined by the Document Properties Marker Macro and the Document Properties Supplier Macro.

    Property placeholders simply render the value of a property. If a property is not defined an alternative value may be rendered which is specified with the macro.

    Macros used to display the property values are

    Display Table
    render-modeunnumbered
    where$<Categories>=[Display / Property]


    ...

    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




    Currently it is not possible to replace simple placeholders with values supplied from document and space properties.

    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.

    Note Box
    Jira
    serversmartics JIRA
    serverId79ad43bc-d289-364e-bfc7-46c09847bebd
    keyPDAC-670
    is considering this approach

    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
    .



    ...

    Section
    titleResources

    For more information on this and related topics, refer to the following resources.

    Tour
    render-as-definition-listtrue
    replace-title-with-nametrue





    Piwik Set Multiple Custom Variables


    NameValue
    Departmentprojectdoc
    Categoryprojectdoc-tip
    Typehowto