Templates within Templates

Note: the sections below can also be accomplished by using regular conditional logic, so this section should only be used in rare cases where you can't accomplish what you're looking for with our traditional conditional logic.

Using the contents of one document in another

Do you want to insert the contents of another template into one of your templates?  

Use this language to include the text of a subdocument into a main document:

{{p include_docx_template('sub_document_name.docx') }}

In the example above, you have two documents:

  1. The Main Document, which includes the syntax above.
  2. The Sub Document, which is called "sub_document_name" and contains whatever text you want to use in the Main Document.


Note: Please make sure your document name has underscores instead of spaces.

When is this feature useful?

  • Headers - if you have a company header that is constantly changing, using a sub-document allows you to just change the one document and have it be used by all of the documents that use your header.
  • Clauses - if you have certain clauses that you want to store in a centralized location (like a non-compete that is constantly changing, but is referenced in more than one document), you can create a separate subdocument for that clause, then reference the document using the syntax above in the exact locations in your documents where you want the clause to appear.

If you want to set the values of calculations or paragraphs in a document, please visit this article here.