Skip to main content
Version: 4.1 (2026 H2)

Versions

The version control in primedocs allows to make and test more complex changes in the templates without endangering the productive templates.

In general, a template can have multiple versions, with all versions linked by the unique TemplateId. If a new version of an existing template is created, all data is copied. A version is created manually.

note

Not to be confused with the template status (In Progress/In Test/Released): the template status applies to the template as a whole and controls its visibility for users; the release mode marks individual versions of a template and determines which version is used during document generation.


Create a New Version

A new version is created in the template editor:

  1. Open the template in the template editor.
  2. On the ribbon, in the Versioning group, click Create new version.
  3. In the dialog, enter a label and information for the new version (e.g. what is changed in this version).
  4. The Set as draft checkbox is enabled by default; this marks the new version directly as a "draft".
  5. Confirm with Create new version — the new version takes over all data of the template and opens in the template editor. It is not yet published.

The Publish and Set as draft buttons in the same ribbon group are used to change the release mode of a version later. All versions of a template are shown in the version history of the template editor.


Release Mode (Public Draft)

To select the correct template version during document generation, a version must be marked accordingly:

  • Published: This template version is the public version, visible to all users.
  • Draft: This template version is used for testing and is only visible to template administrators.
  • Unspecified: This template is not defined as either "Draft" or "Published" (usually an old template version). This is a technical value with no dedicated label in the user interface — such a version carries neither the "Draft" nor the "Published" marking there.

"Published" and "Draft" can be set at the same time. "Published" and "Draft" together behave like "Published" alone.


Generation Types

For the Document Engine, there are three different ways to open a template:

  • Document: the template is used to create a new document. For example, it is selected directly in the client and a new document is generated.
  • Editor: The template is opened from the template editor in the corresponding editor.
  • Test Document: To test a template, a document is generated from the template editor using "Test Document". Technically, this is exactly the same process as when a document is generated.

Inheritance and Subdocuments

Depending on the creation type (Document/Editor/Test Document) and release mode (Published/Draft/Unspecified), the inheritance or sub-document relation is resolved differently.

Creation typeVersion of selected templateResolved version of dependencies
DocumentPublishedPublished
DocumentDraft(not possible)
DocumentUnspecified(not possible)
EditorPublishedPublished
EditorDraftDraft
EditorUnspecifiedDraft
Test DocumentPublishedDraft
Test DocumentDraftDraft
Test DocumentUnspecifiedDraft

Usage Scenarios

Normal document generation - "Document"

If a user generates a document (= creation type "document"), the version of the template marked as "published" is taken. Any dependencies, e.g. layout templates or style templates, are also resolved as "published".

Change to a currently released template - "Editor" and "Published"

If the template editor edits an already released template version (= "published") all dependencies are also resolved as "published". This option is recommended only for manageable changes. For larger changes, a new version should always be created.

Change to a style and test the effects

The template editor can create a new version of the style template. This version is automatically marked as "Draft". To test the changes in a content template, the template editor can now create a test document via "Test Document". This resolves the "Draft" style as a dependency.

Adding a new style and using the style in a new layout version

If you want to add a new style to an existing style template and also use the style in a parent layout template, you can create a new version of both the style and the layout template. Both new versions are automatically marked as "Draft". If the "Editor" is now started from the layout template, the modified style (also in "Draft" mode) is loaded. When the changes are complete, both versions can be marked as "published" together.