Document Template
A document template is used to generate documents in ContactsLaw.
Templates consist of a body (e.g. an ordinary Microsoft Word document) containing content markers, as well as a definition which specifies how content (e.g. data from contacts, matters or other documents) is inserted or manipulated to produce the output.
Templates are designed to be subscriber-independent, making it possible for them to be shared (exported/imported) between different ContactsLaw subscribers without reference to any subscriber-specific resources such as workgroups, document types, roles or fields (which are certain to differ between installations).
To that end, templates have a separate configuration which maps between the abstract resources in the template definition and the specific resources available where the template is used. A given template may have several configurations, either for different workgroups (e.g. utilising specialised roles or fields) or for different purposes (e.g. interactive vs automated). A template cannot be used to generate documents until it has been configured.
Properties
Templates have the following properties:
- Description - The name of the template, as it appears in the list of templates and for import/export purposes.
- Body Format - The file format of the body of the template, which is indicative of the application used to edit it (e.g. Microsoft Word).
- Output Format - The file format of the documents generated from the template, if different to the body format. Specifically, ContactsLaw uses Markdown (.md) templates to generate Email Message (.eml) documents.
- Category - Freeform text used to group together logically similar templates.
- Active Indicator - Determines whether the template can be selected during document creation. Mark templates as inactive when they are no longer being actively used.
- Fragment Indicator - Marks the template as a fragment, which can be inserted into other templates. Fragments are used to define reusable content, such as headers or footers, payment information, etc. Only Markdown (.md) templates can be used as fragments.
- History - Describes the changes that have been made to the definition of the template over time, with the ability to revert to an earlier version.
- Publisher Information - Specifies the version, author and copyright information if the template is exported.
Template Body
When creating a new template, the editor initially starts with an empty body in Markdown (.md) format. ContactsLaw includes a built-in editor for Markdown documents, which can be accessed via the Body tab. Markdown supports a limited set of formatting, including paragraph and font styles, hyperlinks, colours, lists and tables. For more complex formatting, consider using a different file format for the template.
Alternatively, you can set the body of the template using the following ribbon commands:
- New - Creates a new, empty body for the template in a particular file format.
- Upload - Uploads an existing document to use as the body of the template.
Once set, you can use the following commands to manipulate the body of the template:
- Open - Opens the body for editing in its associated application (e.g. Microsoft Word).
- Check Out - Checks the body out for editing.
- Check In - Checks in changes to the body made in an external editor.
- Discard Checkout - Discards any changes made to the body since it was checked out.
Purposes
Templates can be configured so that ContactsLaw will use them for a specific purpose:
- Fax
- Letter
- Invoice - Generated when an invoice is finalised.
- Receipt - Can be generated on-demand from a transaction of the appropriate type.
- Report - Can be generated on-demand from any built-in report.