Templates
A Template is a customizable format for viewing and exporting data: mail merge letters, itemized invoices, certificates, calendars, and more. Templates use HTML and CSS for layout, the Nunjucks templating language to inject data, and a Designer Mode for building visually without code. This chapter covers what Templates are, the editor and its Components, and worked examples to build from.
In this section
| Article | In one line |
|---|---|
| What is a Template? | A customizable, data-driven format for HTML and PDF output. |
| Creating and viewing Templates | Create, run, and act on a Template. |
| Writing and editing Templates | The editor, Designer Mode, and injecting data with Nunjucks. |
| Components | The default template.njk, helpers.js, and style.css files. |
| Assets | HTML, CSS, JSON, JavaScript, and uploaded files. |
| Inputs | Runtime Inputs, plus defaults and locks. |
| Processors | Pull data from Datasets, Queries, scripts, and AI into the context. |
| Output | The Context Viewer and PDF export options. |
| Example Templates to build from | Hello World, Invoice, Custom Letter, and Award Certificate. |
| Hello World | The default Template and the editor toolbar. |
| Award Certificate | A certificate driven by Inputs and image Assets. |
| Custom Letter | A styled letter driven by a Dataset and Power Script. |
| Invoice | An itemized invoice with a looped line-item table. |