Data & variants
Docs/Data & variants

Parameters or props?

Choose where to store template content and where to supply data for each document.

3 min read4 sections
On this page

You’ll see both Props and Parameters when editing a template. Both supply values to the content, but they serve different purposes: one stores values that belong to the template, while the other receives data for each document.

Keeping them separate lets you edit the design in one place and reuse it with different data, without reopening the editor for every run.

1. Choose where a value belongs

Use Props for values saved with the template, such as headings, labels, colors, and logos. Use Parameters for data supplied per run, such as a recipient, reference number, or list of items.

Value Where it belongs
A “Recipient” label A prop on the section displaying it.
The recipient’s name A parameter.
A shared color or logo A Global prop.
A list of items An array parameter.
A label with English/Vietnamese versions A prop with variant-specific values.
Props
headingText
VALUEDocument title{{ props.heading }}
Parameters
recipientText
DEFAULTTembuilder{{ params.recipient }}
Props are saved with the template · Parameters receive data for each run

2. Props belong to the part you are editing

Select a section, Header, or Footer in Structure, then open Props. Select Add prop to add a value. Available types include Text, Number, Boolean, Array, Object, Color, and Asset.

In that part’s HTML, read the prop with {{ props.heading }}. For a shared Global prop, use {{ global.props.propName }}.

Different sections can have props with the same name. Check the section name above the Props list to see which part you are editing.

Structure → Section → Props
Section+ Add prop
headingText
VALUEDocument title{{ props.heading }}
Select a section to edit its Props

3. Parameters supply data for each run

Open Parameters → Schema to declare field names, types, and defaults. Use {{ params.recipient }} in HTML to read the recipient field.

Inspect the data object in Payload, then use that structure when entering data in Run. Supplying a new value changes the run’s data, not the props saved in the template.

See Declare input data to add fields to a template.

Parameters+ Add
SchemaPayload
recipientText
DEFAULTTembuilder{{ params.recipient }}
{ "recipient": "Tembuilder" }
Parameters → recipient → params.recipient

4. Combine them in HTML

For example, heading stores a section heading as a prop, while recipient receives the reader’s name as a parameter:

<h1>{{ props.heading }}</h1>
<p>{{ params.recipient }}</p>

Edit heading in Props to change the template’s heading. Supply a different recipient to reuse the design for another person.

For multiple sets of labels or colors in one template, see Template variants.

<h1>{{ props.heading }}</h1><p>{{ params.recipient }}</p>
→
TembuilderDocument title

Tembuilder

Template text and input data appear together in the document

See the Handlebars syntax reference for conditions, scope, escaping, and advanced examples.

Search documentation