PTC Placeholders
Standard Placeholders
The placeholder-marker is configurable in the Page Tree Creator settings. In the standard configuration they are double dollars: $$placeholder$$
When using the Page Tree Creator, any placeholder from the source page tree/template is displayed in the replacement form and will be replaced with the user input.
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.
Default Placeholder | Description |
---|---|
$$Current_Date$$ | Place the current date |
$$Current_User$$ | Place the current user |
$$Current_Time$$ | Place the current time |
$$Current_Year$$ | Place the current year |
$$Current_WeekDay$$ | Place the current week day, e.g. Monday, Tuesday... |
$$Current_Day$$ | Place the current day within the month, e.g. 15 |
$$Current_Week_Number$$ | Place the current week number, e.g. 29 |
$$Current_Month_Text$$ | Place the current month as string, e.g. April |
$$Current_Month_Number$$ | Place the current month as number, e.g. 8 |
$$Template_Title$$ | Place the title of the template |
$$Template_Space$$ | Place the space of the template |
$$Template_Version$$ | Place the version of the template |
$$Source_Space_Title$$ | Inserts the title of the space where the original page is |
$$Source_Space_Key$$ | Inserts the key of the space where the original page is |
$$Target_Space_Title$$ | Inserts the title of the space where the new page is created |
$$Target_Space_Key$$ | Inserts the key of the space where the new page is created |
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 the table below.
For example, if you want to use a date picker in the replacement form, you can add a %d at the beginning of your placeholder. It needs to look like this example: $$%d YourPlaceholder$$
By default the Placeholder Marker will be $$ and the Format Marker %, if you have reconfigured them in your settings do not forget to use the ones you have set.
Format (shortcut) | Description | Result |
---|---|---|
Standard | This format allows the user to replace the placeholder with text. The user will be presented with a normal text input field in the replacement dialog. | StandardText |
Date (d) | This format allows the user to replace the placeholder with a date. The user will be presented with a date-picker in the replacement dialog To perform calculations (+/-) on the date, simply add an additional Format Marker % behind the date along with the time type into the date placeholder:
%+1m will add an additional month. The final placeholder looks like this: $$%d DateExample%+1m$$ |
|
Link (l) | This format allows the user to replace the placeholder with a link. The user will be presented with two text input fields in the replacement dialog. After the copy process the link will be displayed with the text entered in the first field. By clicking on the text the user will be redirected to the link entered in the second field. | |
Multiline (ml) | This format allows the user to replace the placeholder with text. The user will be presented with a multiline-text input field in the replacement dialog. | MultilineText_This text is artificially long to demonstrate the featured of the "Multiline" placeholder format |
Dropdown | This format allows the user to replace the placeholder with text. The user will be presented with a dropdown menu with multiple options in the replacement dialog. The user can replace the placeholder with one of these options. | Option3 |
Multi-Dropdown | This format allows the user to replace the placeholder with text. The user will be presented with a dropdown menu with multiple options in the replacement dialog. The user can replace the placeholder with multiple of these options. By default the options will be separated by comma. This can be changed in the macro config. | Option2,Option3,Option7 |
Regex | This format allows the user to replace the placeholder with text. The user will be presented with a normal text input field in the replacement dialog. The user will only be able to submit a value that is accepted by the regex defined in the macro config. | 1.44 |
Required (r) | When using the Placeholder Configuration Macro any placeholder of any format can be set as “required” by checking the correct checkbox in the macro. The user also has the option to set a standard placeholder as required without using the macro. For this the user needs to add “%r” to the placeholder when setting it. E.g. $$%r ReqExample$$ | StandardText |
User (u) | This format allows the user to replace the placeholder with a user mention. When using the Placeholder Configuration Macro choose the “User” type. Or use the format marker followed by a “u”: E.g. $$%u UserExample$$ In the Replacement dialog a searchable drop down will appear with all users on the current instance. | User mention @Alice |