Introduction: Template and Component Files

The Template File

The first step in automating a new HotDocs template is to create a template file. You can create three types of template files: text templates, and interview templates.

It is recommended that template names are kept to less than 52 characters and don't use non-ASCII characters.

The Component File

When you create a new template file, HotDocs automatically creates a companion file called the component file. The component file contains information about variables and other components used in the template. Both the template file and the component file are necessary for a template to work. Whenever you copy a HotDocs template—for example, to share a template with another user—you must be sure to copy both the template file and the component file.

HotDocs gives the component file the same name as the template file, except that the file name extension for the component file is .CMP. For example, if the template file name is Insure.rtf (for a Word template), the component file name will be Insure.cmp.

The following image shows a fully automated text template with its component file superimposed and overlapping the template:

The component file works automatically in the background—as you create various components in the template, they are automatically stored in the component file. Normally each template uses its own component file, but you can make two or more templates share one component file.

You work with components in the component file using Component Manager. For example, you can copy variables or other components from one component file to another, create variables, and drag variables from Component Manager directly into the template.

HotDocs does not support templates with embedded mail merge data. You need to remove this data before assembling the template.