Word templates ensure the uniformity of your object export to Word files.

On the Word Templates (Settings inline-svg-1 > Configuration > Word Templates) page, you can manage all your templates. To assign them to specific applications, see the Packages Documentation. At least one template must be assigned for Word and PDF exports to be enabled.

Add a Word template

  1. In the top-right corner, click the + New template button.
  2. Fill in the following fields:
    • Name: Template name displayed on the Word Templates page and on the template selection window.
    • Key: Reference key used in packages.
    • Attachment: Word file attachment with the template.
    • [Optional] Description: Description for better understanding of the purpose and use of the template. Displayed on the Word Templates page.
    • [Optional] Sort objects alphabetically by name: Off by default. When enabled, all objects are shown in one list sorted by name, without the hierarchy, in both Word and PDF files generated from this template. See Sort objects alphabetically by name.
  3. Click Save to finish the configuration.

Sort objects alphabetically by name

When this option is enabled on a template, both the Word and PDF export generated from it list all exported objects (the objects you selected to export and all of their descendants) in a single list sorted alphabetically by object name, instead of following the object hierarchy. Objects with identical names keep their original hierarchy order relative to each other.

Each object is rendered like a top-level object, using the top-level template block and heading style. If the template uses chapter numbering, chapter numbers form one continuous series based on the numbering pattern’s top level.

Tip

If you also enable One document per top-level object (see the Word/PDF export steps in Object export), each resulting file is sorted independently.

This option only changes the order objects appear in the exported file. It does not change the manual order of objects in the hierarchy.

Templates with this option enabled show a Sorted alphabetically label next to their name on the Word Templates page and in the template selection step of the Export objects dialog. That step also displays the note: Templates marked "Sorted alphabetically" show all objects in one list sorted by name, without the hierarchy. Applies to Word and PDF.

Manage Word templates

Identify your template and click the three dots on the right. Here, you can:

  • Edit your template: All fields except the key can be changed.
  • Download the template: Downloads the Word file containing the template.
  • Delete the template: Removes it from the Word Templates list.

Create a Word template

Every Word template is composed of the following sections, which can be configured:

  • Object detail section
  • Multi object section
  • Header and footer
Warning

The Word Export Template configuration section is aimed at more advanced users of Dawiso, as you will need to reference properties created in JSON packages.

Each section can contain components, for which the following rules apply:

  • Components are replaced with data from the database (they function as merge fields or variables).
  • Components must be in the <<{jsonTemplate}>> format.
  • Any text within double angle brackets (<< >>) must be formatted as JSON.
  • All components must have a type field, which specifies the component type.
  • Components in the object detail section can include display conditions.
Tip

Any static text and formatting of the template stays consistent across exported objects.

Example of a basic Word template (change placeholder component types and attribute types to the ones used in your object type template):

<<Object details>>
<<{"type": "objectName", "useNumbering": true, "styles": ["1 Number Heading", "2 Number Heading", "3 Number Heading"]}>>
<<{"type" :"attribute", "attributeType": "definition", "style": "Normal" }>>
<<{"type": "text", "text": "Only when definition is not null", "style": "1 Number Heading", "conditions": [ { "type": "attribute", "value": "project_id",  "operator": "not empty" } ] }>>
Status:
<<{"type": "objectProperty", "property": "Status", "style": "Normal"}>>
Attachments:
<<{"type" :"attachments", "header": "Attachments", "headerStyle": "Attachments"}>>
<</Object details>>

For the full step-by-step guide, see Word Export Template.