Skip to main content

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

ArticleIn one line
What is a Template?A customizable, data-driven format for HTML and PDF output.
Creating and viewing TemplatesCreate, run, and act on a Template.
Writing and editing TemplatesThe editor, Designer Mode, and injecting data with Nunjucks.
ComponentsThe default template.njk, helpers.js, and style.css files.
AssetsHTML, CSS, JSON, JavaScript, and uploaded files.
InputsRuntime Inputs, plus defaults and locks.
ProcessorsPull data from Datasets, Queries, scripts, and AI into the context.
OutputThe Context Viewer and PDF export options.
Example Templates to build fromHello World, Invoice, Custom Letter, and Award Certificate.
Hello WorldThe default Template and the editor toolbar.
Award CertificateA certificate driven by Inputs and image Assets.
Custom LetterA styled letter driven by a Dataset and Power Script.
InvoiceAn itemized invoice with a looped line-item table.