Skip to main content
Skip table of contents

Placeholder Macro

The PTC Placeholder Macro allows you to configure additional settings for individual placeholders on a template. These settings will be applied and enforced when the template is copied.

The PTC Placeholder Macro provides the following configuration options:

  • What type the content with which the placeholder is replaced should be restricted. (per default Standard)

  • Whether the user copying the template, must provide a value to replace the placeholder with, or not.

  • Setting an additional description text for the placeholder to be shown in the replacement dialog when the template is copied.

  • If the content of the macros body should be displayed on the page.


Placeholder Macro in ancestors of source page

The Placeholder macro does not have to be on the template or source page. It’s possible to put the Placeholder macro in any ancestor page for example the parent or the templates.

Example

  • Home Page, body: Placeholder Macro for __date__ with Type DATE

    • Template1, body: “This is my __date__”

    • Template2, body: “__date__ is a good date”

Now the Template1 can be instantiated without the Placeholder macro for __date__ being anywhere on the template.


Placeholder Formats

The PTC Placeholder Macro allows you to set, what type of content the user copying the template, is asked to enter when replacing placeholders.

It currently provides the following types of inputs.

Value

Description

Standard

Default

When setting the placeholder format to standard, the user copying the template can supply any text with which the placeholder is replaced.

User

Placeholder of the user format will ask for existing Confluence users when being replaced. The user names will be displayed in default Confluence rich text, such as @a user  for example.

Date

Date placeholder require a valid date to be entered into the replacement. The date will be displayed in default Confluence rich text, such as 01 Jan 2020 for example.

Link

A placeholder set to the link format will be replaced with a functional link to another Confluence page or an external web page.

Page

A placeholder set to the page format will be replaced with a link to a Confluence Page.

Multi Line

The multi-line format makes it easy to have the tag replaced with multiple lines of text.

Dropdown

When the dropdown format is selected, the user can choose one or multiple items from a dropdown menu in the replacement dialog. The selectable values can be defined directly in the PTC Placeholder Macro.

Regex (only in PRO version)

The regex format forces the user to choose a replacement text that matches a regular expression defined directly in the PTC Placeholder Macro.

Counter (only in PRO version)

The counter tag works in the same way as Consecutive Tags. What the counter tag adds, is the location where it counts up.


Macro Parameters

Parameter

Input Field Type

Description

Placeholder

Input String

The placeholder you want to configure.

Format

Dropdown

Select what format you want the placeholder to be:

  • Standard

  • User

  • Date

  • Link

  • Page

  • Multi Line

  • Dropdown

  • Regex (only in PRO version)

  • Counter (only in PRO version)

Required

Checkbox

If checked, an input is required for this placeholder.

Hidden

Checkbox

Check to hide the macro.

Optional Parameter

Description

Input String

Insert a description below the input field when replacing the placeholder.

Info

Input String

Insert some help for the user with a little notification icon when replacing the placeholder.

Reuse Replacement

Input String

When instantiating the template a second time it uses the replacement value from the earlier instantiation. (If available on the target page ancestors)


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.