Document Template

From ContactsLaw Documentation
Revision as of 17:15, 17 July 2023 by Bradley Smith (talk | contribs)

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.


Purposes

Templates can be configured so that ContactsLaw will use them for a specific purpose:

  • Email
  • 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.