An Employment Agreement contract with numbered clauses that can be included or removed based on the data.
Includes page numbers, total pages and an address footer on every page.
The data in this example is "flat" as though it was generated by a webForm.
Automatic numbering
The clauses have been created using a Numbered List.
Some of the clauses are surrounded by Conditional Sections: <<cs_ and <<es_.
For example: "3) Internal Reporting" is preceded by <<cs_includeReportingPerson>>.
The data contains "includeReportingPerson":"false" (JSON example).
In the final document item 3 does not appear. The numbering of the remaining items in the list adjusts automatically.
Page numbering and footers
The template uses the footer feature of Microsoft Word or LibreOffice.
In the footer: "Page [Number] of [TotalPages]" has been added using the built-in page numbering features of the template editors.
There is no need to write any code or provide any data to use this feature.
The footer also contains placeholders like <<branchAddr1>> which will appear on every page in the final document.
Paragraph settings
Each numbered heading has the paragraph property "Keep with next" set.
This means that in the process of generation, if the text under that numbered heading is appears at the top of a new page (as items are added/removed), then the heading will also be "pulled" on to the new page.
In Microsoft Word, select "Keep with next" in the Paragraph settings.
In LibreOffice, select "Keep with next paragraph" in the Paragraph settings.
This is a paragraph property that is set in the template using the built-in features of the template editors.
The same setting is also used for the signature block paragraphs at the end of the template, starting with the "I accept the above terms...".
This ensures that if the "SIGNED" or "DATE" lines move to a new page, then the preceding paragraphs "NAME" and "I accept..." won't be split up.
Using these paragraph settings results in a template that flows and adjusts in a predictable manner.