Table of Contents

Go back to the Tryout page:

https://eps-demo.atlassian.net/wiki/spaces/AS2/pages/302841872


Documentation: PTC Placeholders


Copy this page, to see how the example placeholders are replaced.

PTC Create Page Tree Button

Standard Placeholders

Placeholders can be used in page titles, macro parameters, labels, URLs and attachment names!

Example: "$$Name$$" can be replaced with your name "John Smith"
Every "$$Name$$" placeholder that is in the document will be replaced with "John Smith”.

In the default settings, the placeholder marker corresponds to a double dollar sign "$$", but this can be configured to your choice of marker.

Also, the PTC Create Page Macro will automatically detect standard placeholders, even without an associated Placeholder Configuration Macro. This feature is showcased when copying the page with the button “Copy this page”. $$Name$$ will be detected as a placeholder, and you will be able to replace it.

Example for Standard Placeholder

$$standard_placeholder$$

PTC Placeholder Configuration

Default Placeholders

Default Placeholders can be inserted like normal placeholders, but get replaced automatically since the value is already fixed, they do not appear in the replacement dialog.

Example for Default Placeholder

$$Current_Time$$

PTC Placeholder Configuration

You can create your own default values for your placeholders with the Default Value Macro (PRO). You can find examples here:

.


Cascaded Placeholders

Cascaded Placeholders allow users to create templates from templates. These Placeholders create another template with a placeholder when instantiated. This process can continue, creating multiple levels of templates.

To use cascading placeholders, enclose a placeholder in two or more placeholder markers like this:

$$$$placeholder$$$$

This will result in the instantiation of the placeholder, which can then be used as a template for another placeholder:

$$placeholder$$

When using a cascaded placeholder e.g. $$$$placeholder$$$$ it will be automatically converted to $$placeholder$$ without being shown in the replacement dialog when the page or space is being created.

This can continue indefinitely. Just put 2 more “$$” at the front and back of the Placeholder for every layer you desire.

Cascading placeholders can also be created by replacing an existing placeholder with a cascading placeholder in the replacement dialog:

$$author$$ replaced by $$$$author$$$$ becomes $$$$author$$$$

Example for Cascaded Placeholders

$$$$$$Cascaded_Placeholder$$$$$$

PTC Placeholder Configuration

More Information about Cascaded Placeholders


Placeholder Formats

All Formats can be defined by using the Placeholder Configuration Macro. Some formats can also be defined by using their shortcut directly when setting the placeholder. For all formats that support shortcuts, the shortcut will be listed next to the Format in Placeholder Formats.

For example, to use a date picker in the replacement form: $$%d YourPlaceholder$$.


Placeholder Macros

Placeholder Configuration Macro

Documentation: Placeholder Configuration Macro

The Placeholder Configuration Macro has been used multiple times in this demonstration, and specifically on this page. It allows the author of a template to set a placeholder format, if it is required, description and dropdown options automatically to a Placeholder.

The Placeholder Configuration Macro can be placed within any page of the page tree and if there are multiple of the same placeholder, will favor the placeholder configuration macro in the same page or work its way up the tree.

Inheritance Concept:

If a page does not contain a macro and the page is a child page down the page tree, it will search upwards for a configured placeholder macro and will keep working up until it finds a parent page that contains a placeholder configuration macro.

To find more Information about the Parameter-Types, please go to: Macro Parameters

Ignore Placeholder Macro

The Ignore Placeholder Macro allows you to retain placeholders when copying a template. To achieve that, you just have to insert the placeholder inside the body of the Ignore Placeholder Macro.

It is also possible to add other Confluence macros to the body of the Ignore Placeholder Macro. In that case, the macro parameters won't be replaced and references will point to the same location as before copying.