Using One Component File for Multiple Templates

Be sure to back up your shared component files on a regular basis. If a shared component file becomes damaged, you could lose all of the components for several templates.

When you create a templateA word processor or form document that has been converted to HotDocs format so that it can be automated. When in template format, changeable text in the template can be replaced with variables. Other instructions can be added as well, such as instructions that create lists, condition text, and insert other templates. file, HotDocs automatically creates a component fileThe file that stores all of the components used in a template. The component file and template file are both necessary for template development and document assembly to work correctly. Template developers use Component Manager to work with components. for that template. The component file stores variableA component that is used to represent changeable text (such as names, dates, numbers, etc.) in the template. Types of variables include Text, Date, Number, True/False, Multiple Choice, Computation, and Personal Information.s, dialogIn template development, represents the component in which the developer groups variables and other components. In document assembly, represents the group of questions in the Interview tab of the assembly window where users enter their answers.s, and other componentA template resource file that displays or stores information about the user input/answers to merge in the final document. Examples of components include variables, dialogs, dialog elements, merge text groups, and formats.s you use for that specific template.

When several related templates use many of the same components, you can create all of those components just once and store them in a shared component fileA common component file to which several related templates are linked. To use a shared component file, the template's own component file must be pointed to the shared file. Changes to components in the file are reflected in all templates that use it. (See also pointed component file.). When you make a change to a shared component, (for example, if you change a prompt or resource text), the change appears in all templates that use that component file.

The way you share the same components with multiple templates is by pointing each template's own component file to the shared component file. Then, as you create and edit components within the template, the template bypasses its own component file (which is now known as the pointed component fileWhen sharing components across multiple templates, represents the template's own component file, which, in turn, points to the shared component file. or actual component file) and stores the information in the shared component file instead.

You must save all templates, pointed component files, and shared component files in the same folder.

It is best practice to point all the templates you want to share a component file to the shared component file before you start creating components in any of the templates. That way, HotDocs saves the components directly in the shared component file so they are ready for use when you automate other templates. Otherwise, you must copy those components to the shared file so HotDocs can find them.

 Pointing the current component file to the shared file does not automatically copy the components there.

When specifying component file properties, HotDocs uses properties from the shared component file for all templates that point to it (except for those specified at the General tab of the Component File Properties dialog box). You can, however, use the pointed component file's properties. Additionally, if HotDocs has specified some of the properties you want to use in the shared component file, you can copy them to the pointed component file.

If you are pointing several templates to a shared component file, but you want each template to use its own custom interview, at the Interview tab, clear Use interview properties stored in the shared component file, select Use custom interview, and then specify the name of the interview computation in the Interview component text box.

You can unpoint a component file using Component Manager.

You can point new templates to as shared component file as you make them but you can also point pre-existing templates to a shared component file:

To point the current component file to a shared component file

  1. Make sure you have closed all templates and component editors. (The only window you should leave open is the template library.)
  2. At the template library, select the template whose component file you want to point to the shared component file.
  3. Click the Component Manager button.
  4. Click the Component File Properties button.
  5. At the General tab, click the Shared component file drop-down button and select the shared component file. (This drop-down list shows all the component files listed in the same folder as the actual component file. Remember, you must save pointed and shared component files to the same folder.)
  6. Optionally, to use the properties of the pointed component file instead of the shared, clear Use properties stored in the shared component file at each respective tab of the Component File Properties dialog box. To copy the properties of the shared component file into the pointed component file, click Copy Shared. (HotDocs will not update any properties you change after choosing to use the pointed component file in the shared file.)
  7. Click OK. The current template's component file is now pointed and the contents of the shared component file appear in the component list. (At Component Manager, the Component File Properties button changes appearance to indicate that the component file is now pointed.)

If you created variables before you pointed the component file to the shared file, you must copy those variables to the shared file.

HotDocs can display a warning when you edit a template that has a pointed component file. This warning reminds you that changes you make will affect all templates that point to the component file you are editing.