Skip to main content
Version: 4.1 (2026 H2)

Template Composition

In primedocs, documents are never generated from a single, monolithic template: several template types with clearly separated responsibilities are assembled into one document at generation time. This page gives an overview of the types and explains how the composition works.


Template Types and Their Purpose

Each template type has one clearly defined job — only the combination produces the finished document:

Office applicationTemplate typePurpose
WordStyleFormatting styles (fonts, spacing, colours) according to CI/CD guidelines.
WordLayoutHeaders/footers, page margins and placeholder definitions.
WordContentThe actual document content; based on a layout and a style template.
PowerPointMasterBase configuration with slide layouts; foundation for all other PowerPoint templates.
PowerPointContent, slide, asset gallery and morePresentation content, individually insertable slides and assets; all based on a master.
OutlookEmail, signature, disclaimer, campaignEmail creation and organisation-wide managed signatures.
ExcelExcel templateWorkbooks with linked field data.

In addition, there are the designs: they are not a template type, but form the basis of the entire hierarchy by defining the CI/CD fonts and colours. They are configured per organisational unit.


Composition Principle

The types build on each other. For Word:

Design (organisational unit)
└── Style template
└── Layout template
└── Content template → generated document

For PowerPoint the same applies: content, slide and other templates are based on the master template.

At generation time, the document is assembled from these levels — nothing is copied when a template is created. A change to a base template (e.g. a new logo in the layout) therefore takes effect immediately in all templates based on it. This is why the best practice is to always use all levels of the hierarchy and to maintain shared elements in the base templates (style or layout) wherever possible.


Placeholders Instead of Inheritance ("Plug-in System")

The connection between the levels works like a plug-in system:

  1. The layout or master template defines named placeholders (e.g. "Subject" in the header) via the placeholder definition — without knowing which content will be supplied later.
  2. The content template fills these placeholders via the placeholder mapping by assigning Fields to them.
  3. Shared configurations and logic are referenced via global configurations instead of being duplicated.

Content is therefore neither inherited nor overridden, but plugged together via defined slots. Only formatting styles (style) and the structural frame (layout) are taken over from the base. This keeps templates verifiable: primedocs can check whether a content template serves the placeholders promised by the layout.

Distinction from classic templates

Classic templates follow an inheritance concept: configurations are inherited along the template chain and overridden in subordinate templates. Web-enabled templates no longer use this configuration inheritance — composition happens exclusively via placeholders and referenced global entries.