Most Asked Questions
Create your first document with the Page Tree Creator (PTC) in order to become familiar with PTC. To do this, you need a source document (template) as well as a macro at the location you want to use as a starting point to create the document.
Create a template
Create a simple page serving as a template. The page title should include a tag in the form __TagName__, i.e. a tag name between two underscores each (__).
Create a PTC macro
Open the page you want to use as a starting point for the creation of a document with the PTC and insert the macro PTC (Page Tree Creator): Button there.
Then configure the inserted macro (button) as follows:
FieldContentButtonNameHow the button should be named, e.g. Create My First DocumentSource PageTop page of the page tree to copy (template page tree)Target PageWhere to copy the page tree. If left empty, page tree is added to top level of space.
Save the page
Create a document using the PTC macro
Go to the page on which you have created the PTC macro (button).
Click on the button to create the document.
On the next page you can replace the tags defined in the template with your content.Enter a number for the tag defined in the template, e.g. 1.
Click on Create page to create the document.
You will automatically be forwarded to the newly created page tree.
Important: If you want to use Page Tree Creator multiple times with a target on the same space, you have to use a tag in each page title (Or a prefix if you aren't using buttons). Confluence only allows unique page titles.
What you have learned
You can very easily create your own templates (entire tree structures) and apply tags to them which will be replaced by your values before the creation of the document. There are no limits to your imagination!
At the same time, you can also create the button for the creation of your document at the same location from which you prefer to create your documents.
You as the user no longer have to worry which template you need, where to find it and where to create the document. You have defined all this once and can now perform your everyday work as a user with maximum efficiency.
When you create templates, it is useful to make templates identifiable as such.
The template sticker is intended for this purpose; it generally precedes the main page title of a template. The template sticker can be defined in the PTC configuration. The default value is _Template. A template sticker is not inherited upon creation of a document, i.e. it does no longer appear in the title of the newly created document.
Start the title of the main page of your template with the template sticker
Example: _Template .....
Initial situation
You have listed your documents (pages) on an overview page. Let us assume that the documents are offers. Exactly on this overview page, you want the option to create an additional new offer. The basic structure of the offer should be defined in a template.
Create template
Ideally, you should create your templates in a separate space.
Create the main page of your template.
Insert tags into the title of this new page, e.g. for the offer number and the offer title.
Example: __OfferNumber__ Offer __OfferName__Insert a template sticker before the title in order to clearly label your new template as such.
Example: _Template __OfferNumber__ Offer __OfferName__Insert additional tags as required on the new page. The same tag may be used several times and may also occur in macro parameters and in labels.
Save the new page.
Create subpages as required. Ideally, the name of each subpage should also start with the offer number in order to maintain the clarity of page names.
Insert PTC Macro
Insert the PTC Macro PTC (Page Tree Creator): Button on the overview page.
Assign a suitable name to the button.
Example: Create OfferEnter the first page of your template as the source page
Leave the target page empty, as the document is to be created below the overview page
Note: If several offer templates exist, for example, you can also insert several PTC macros on the overview page, one for each template.
Initial situation- you have created new documentation for a project. In the newly created project, you want to have the option to create additional document as a specific location, a design document, for example.
Approach
In order to have this option, you need to insert a PTC-Macro PTC (Page Tree Creator): Button already in your template. But be careful, as you do not want the tags in the field Source Page to be replaced in this case upon the creation of your main document.
You can prevent this by embedding the PTC-Macro you have just created in a PTC (Page Tree Creator): Ignore Tags:
Create the PTC-Macro PTC (Page Tree Creator): Ignore Tags at the desired location in your template.
Insert the PTC-Macro PTC (Page Tree Creator): Button in the Ignore section.
You can now state your template containing tags in it's name in the field Source Page for this button. These tags will only be applied after you have already created your main document and are now creating a subdocument. Any potential tags in the target page parameter will not be replaced, of course.
Initial situation
You have created a button and when you or someone else tries to click on it, it's disabled or invisible.
Solution
To determine if the button is shown/enabled we check the following conditions:
The user has rights to add pages on the target space.
The user has permission to view the source page which the button refers to.
The space is allowed as a source for the PTC
If there are any permitted-users / permitted-groups in the PTC-Button check if the user is a permitted-user / in a permitted group
If there are any special users/groups defined in the PTC-check if the user is a special user / in a special group.