Scenario
You may 'force' the creation of pages with a standardized page title. This is useful when you are organizing meeting notes pages, budget documentation, status updates, or any time-sensitive documents.
By using an 'injection' notation (sample in the Steps section), you can dynamically add the current date to a page title.
Result
...
Recipe
Apps | Linking for Confluence Server |
|---|---|
Platform | Server and Data Center |
Level | Intermediate |
Estimated time | 15 minutes |
Macros | Add Page |
Suppliers | N/A |
Storage format
You can copy and paste this code into the Confluence Source Editor:
...
Add an Add Page macro.
To set the title of the pages to be created, fill out the Page title parameter. In this example, we want to create the pages with the title format 'Meeting Notes for Feb February 20, 2018', so we will use an 'injection' notation with a keychain from Date Supplier:
Code Block Meeting Notes for %global:current date>date:MMM d, yyyy%
This can be customized to your liking, see . See full description here. For example:
%global:current date>date:yyMMdd% will appear as 170814.
%global:current date% will appear as Mon Aug 14 16:05:16 MYT 2017.
%page:creation date% will appear as 2017-08-14 14:46:51.553.
For the link inside the current page, let's specify 'Create a new meeting notesnote' as the Create link text.
If you want to create the pages based on a template, fill out the Source, and Source Type and check the Live Template parameters.
Add a Children Display macro , to show the list of pages created through this Add Page macro.
Line-by-Line Explanation
...