Not to be confused with the ASSEMBLE command (which queues a template for assembly after your current template has finished), the INSERT command does exactly that – inserts the content of one template into a different template (known as the “parent” template).
This instruction is extremely handy and very under utilised as it is useful for a wide variety of things, not just inserting letterhead!
The INSERT command should largely be used in templates. There are ways to use the INSERT command inside a computation, but there are limitations and rules that apply. Allegedly, an INSERT command cannot be placed inside headers or footers in your template however, we have found that it works just fine with footers, which can save some time in some situations. At any rate, here’s how it works in several different ways -
Template in same location as the template you are inserting into (known as the “parent” template)
Subfolder of location of parent template
Full file path for anywhere on your system
Using a Reference path
Default Templates folder
The INSERT statement is quite often used inside IF statements to conditionally insert oeprative parts of documents. Interstate notices, optional schedules, attached forms etc are all usually INSERTed inside IF statements.
Common Uses for INSERTed Templates
- All stationery, such as letterheads, faxes and memos, with accompanying headers, footers and page numbering
- Signing / execution clauses (say, a single “corporate execution” block and a single “power of attorney execution” block)
- Court headers and footers
- Boilerplate text such as acceptance clauses, court seals, hearing dates, witness blocks and the like
- RE lines on letters
Additionally, INSERTed templates are quite often used simply to segregate content in long templates, so that each template can be tested by itself in isolation to the rest of the template.
Some Off Label Uses
With a bit of effort, it is possible to set up INSERT templates to take parameters. All you have to do is write your INSERT template with a temporary variable that you SET before you insert. Here’s a quick example:
INSERT Template Code:
Some random text up here that is boiler plate and always appears regardless of how the INSERT template is used.
«IF OPT UseNotice TF = TRUE»
This notice must be complied with within 14 days unless otherwise specified.
More random text here about something or nothing at all really.
«IF tmpTE = "Borrower"»
This notice is directed to the Borrower's solicitors and must be complied with within 7 days of the date hereof.
«ELSE IF tmpTE = "Lender"»
This notice is directed to the Lender's solicitors and must be complied with whenever convenient to the Lender.
«IF OPT UseFooter TF = TRUE»
This footer is absolutely pointless except insofar as it demonstrates the concepts of parameters in INSERT templates as applied by the HotDocs document assembly engine.
So all we have really done here is code the INSERT template with some preset variables to hold preset values. Then, when its time to insert the template, we set the parameter variables prior to inserting the template.
PARENT Template Code:
«SET tmpTE TO "Borrower"»«SET OPT UseNotice TF TO FALSE»«SET OPT UseFooter TF TO TRUE»