Templating: Basics


Are you a template administrator and would like to edit a template or create a new template? Learn the basics of templating in this article.

If you are not yet familiar with the template editor, find out more here: https://primesoft-group.atlassian.net/wiki/x/AQDZEQ

Open template in editor

To edit a template in the corresponding Office application (e.g. Word), select the Editor button in the template editor or use Ctrl+E.

First make sure you know where exactly you need to make a change. In the header or in the content? Open the correct template in the template hierarchy.

In this example, the Letter template is being edited using a content template. If you have several language versions of the template, first select which language version you want to edit.

Client-TemplateEdit-LangOptions-20240514-111140.png

The template is now opened in the respective Office application, in this example Word.

In the template editor The Properties, Profile and Document language buttons are deactivated.

In the editor

Edit-WordTemplate-20240514-143546.png

Edit content

(1) As we are editing a content template in this example, you can completely ignore the headers and footers when editing - these are already defined in the layout. Read more about the template hierarchy here:

All entries in square brackets, e.g. [Salutation], are primedocs fields. If you click on the [Salutation] field, you will see Salutation (Field, unmapped). This means that it is a primedocs field that was not defined in the document function, but is a field that comes directly from the document function.

Templating group

(2) The “Templating“ group offers primedocs' own tools to dynamize the template. The following buttons are available:

Bind field

The pop-up window that opens allows you to select profile fields and fields that have been configured in the document function.

Insert snippet placeholder

A snippet placeholder can be filled with one of the two text module types in the Fields document function: WordContent or FormattedText. In most cases, you will insert WordContents in the suitable place.

Insert placeholder

The placeholder is the container for inserting dynamized content into the header or footer of a layout template. Dynamized content can be profile fields or a field defined in the Fields document function, for example.

This button is deactivated in this example because we are in a content template and not in a layout template.

Developer tools

The developer tools help to track and check fields as well as content in generated documents. They display the entire template as XML.


Test document

Once you have edited the template, you want to check whether your changes are correct in a generated document.

Return to the template editor and click on “Test document” or use Ctrl+T. Now fill in all the parameters as if you were a user. The document will then be generated in test mode.

Template editing group

The advantage of testing a document is that the template editing group is then available to you in the open Word document, with the following options:

Generate preview

A "snapshot" is taken of the document at that moment and set as a preview image for this template.

Generate multilingual previews

Generate a preview image depending on the document language.

Developer tools (Test)

See the following explanation: Developer tools.

PrimeSoft AG, Bahnhofstrasse 4, 8360 Eschlikon, Switzerland