Liquid Template

A Google Docs AddOn for contract and parameterized templates.

Install

This product is in beta and you will get a warning during the install process. Liquid Template may be installed from here.

Usage

All menu selections () are under the AddOns / Liquid Template menu.

Create a Template

  1. Create/copy/select a Doc to serve as a template. See Creating Templates for further details.
  2. Insert/replace parameters using <?key?> syntax, e.g. Dear <?recipient?>,.
  3. Select Mark as template to protect the template from accidental processing.

Use a Template

  1. Open the template Doc.
  2. Select Create Doc from template.
  3. Use the Google File Picker to select the folder to save the new Doc.
  4. Click Continue to the new document to complete processing. to go to the newly created document.
  5. Select Process this Doc to protect the template from accidental processing.
  6. Fill out the parameter values in the 'Template Parameters' sidebar and click Submit.

Description

Names

  1. If we have a template Doc named Buyer Contract Template with body title <?buyer name?> Contract, then
  2. the intermediate Doc will be named Buyer Contract, and
  3. the final Doc will be named John Smith Contract where 'John Smith' is the value provided for the buyer name parameter.

Creating Templates

  • End the template Doc name with ' Template', with a space before 'Template'.
  • Use parameters in the template body title. This creates a more usable—if not unique—name for the final Doc.
  • Include instructions at the top of each template Doc just under the body title. Place the instructions within <% delete %>...<% /delete %> directive tags. Place the opening and closing tag on their own lines, like:
    <% delete %>
    Instructions go here.
    <% /delete %>
  • Test your temeplate to ensure that any delete tags and parameter markers (<? and ?>) are balanced and everything behaves as expected.

Processing Docs

  • The delete directive tags and any text between them will be removed from the intermediate Doc on the first processing run.
  • It is not necessary to fully process all the parameters in the first run. Parameters with blank values will be left in the intermediate Doc.

Parameter Names

Parameter names may not include the '?' character in the name. Otherwise, the names should be short, but descriptive.

Terminology

body title
Refers to the first text element within a Doc body. This is generally styled as the 'Title'. Compare to the Doc name, which is the name of the file shown in the upper right corner of the Doc interface.
template Doc
A Google Doc used as a template. Generally, these should be 'marked' as templates using Mark as template.
intermediate Doc
A Doc created from a template but not yet fully processed.
final Doc
An intermediate Doc which has been processed.