Custom Templates

Custom Templates

With this feature users can create reusable templates out of their PlantUML diagrams. Those templates can then be used to quickly create similar diagrams. Templates are stored as attachments on pre-configured Confluence page. Because of this, template permissions are set on page level. Admin can create company-wide templates or user-specific ones simply by setting access to the page containing Template attachments.

Pre-requisites

User must have PlantUML settings enabled before continuing with Custom Templates setup. User will need to perform one-click automatic setup before continuing. Only diagrams created after November 2022 can be used as templates because of the new SVG format.

Click on a button to create PlantUML settings

Setup

Custom Templates require a Template Root Page to be created. This page may reside in any Confluence space, provided that appropriate access permissions are granted. Note that the PlantUML settings create a dedicated configuration space, and this space may also be used to store PlantUML templates. However, you must create a new page for the Template Root Page—do not use the existing settings page.

All child pages of the Template Root Page represent individual template categories. Each category appears as a separate entry in the editor’s Templates popup.

By configuring page-level permissions, administrators can restrict access to specific template categories. This allows individual users to maintain private templates while also sharing public templates with others.

Setup for the Templates Root Page

Now create several Child pages for Templates Root Page named PlantUML Templates.

Add the required template diagrams to each page. Templates are standard PlantUML diagrams. To create one, open the child page in edit mode and insert the PlantUML diagram you wish to use as a template.

After adding diagrams to the child pages, the PlantUML editor will display them as follows:

Custom 1 Page contains 2 diagrams: Gantt 11 and template 1-1

Each child page is displayed as a separate item in the main menu. Every diagram contained on that page appears as an individual entry in the panel on the right.

Select the diagram you wish to use as a template and click the Select button. The editor will populate the diagram’s content and display a preview. You may then continue editing the diagram as needed.