Templates

What's a template?

In DocLift, each final document will be generated from a template. You'll be able to edit the template at any time from an online editor in your account. The template will contain the static elements such as text, images, and titles. It might also include dynamic elements, in other words placeholders that can be put anywhere, allowing you to define content that may vary from one generated document to another.



Create a template

To create a template, simply navigate to "Nouveau modèle de document" from your doclift dashboard.



Design your template

To design your template, you can navigate to your template page and click on the "Modifier" button. You'll end up on the DocLift template's online editor. It is very similar to other text editors, such as Microsoft Word. There are, however, some gotchas that you need to take into account:


  1. Page breaks You can control where each of your final PDF pages will break by inserting "Page breaks". To do this, place your cursor where you want the page to break, then navigate to "Insérer" at the top toolbar and click on "Saut de page".


  2. Columns If you need to divide a part of the template into columns, you'll have to use a table for this. To do this, place your cursor where you want to have columns and go to "Tableau" in the top menu. You'll then be able to choose the layout of the table (number of cols / rows). Once this is done, you can place your content inside the table. Note that you can hide the table borders by selecting the table and clicking in the top menu "Tableau" > "Propriétés du tableau". Then in the "Général" tab, set the border width to 0. From there you can also also set a background color or define border width, shape, and color.




Template variables

A template can hold dynamic content such as text, numbers, dates or checkboxes. This is done through variables. A template variable is defined by the following attributes:


  • Title: The name of the variable. This must consist of alphanumeric characters ([A-Z] and digits[0-9]). Be very precise when naming variables; otherwise, you might have trouble distinguishing them. For instance, if your variable is the first name of an investor, you should name it investor_first_name instead of just first_name. Otherwise, if you add a second person who has a first name, you won't be able to tell to whose first name the a poorly worded variable like first_name refers.


  • Description: This helps explain the exact content you expect to get with with your variables. Descriptions also useful to give details about formatting. For instance, if it's an amount, the following description is a good choice:


The amount of the investor's investment in the following format XXX,XXX.XX.


This way, we know that we should expect an amount with thousands delimiters and 2 decimals.


  • Test value : the test value is a value that will be used for previewing the final rendering of your template. It can have any content.



Create template variables

You can create a template variable directly from the online editor. If you need to create multiple variables at once, you can go to the template's page and click on "Modifier" in the variables' section.



Insert a text variable

You can insert text variables in your template. To do this, just place your cursor where you want to place the text variable and in the top toolbar select "Insérer une variable" > "Sous forme de texte" and choose the variable you need. When making your template dynamic, this variable will hold the value given to it, or no value if you didn't sent any.



Insert a checkbox variable

You can insert a checkbox variable in your template. To do this, just place your cursor where you want to place the checkbox variable and in the top toolbar, select "Insérer une variable" > "Sous forme de checkbox" and choose the variable you need. When making your template dynamic, this type of variable will be replaced with a checked checkbox if you send any value for this variable or an unchecked checkbox if you didn't sent any value.



Previewing your template

DocLift online editor provides a live preview of your template's final result. To access it, just click on the "Desktop" icon in the top right corner of the editor. There's no need to refresh the page; each time you make changes to the template or its variables, the preview will automatically be kept up to date!



;