# Handlebars Syntax — PostFrame — EternalEngine

Use Handlebars placeholders, conditionals, and loops for dynamic email content without the complexity of a full programming language.

[Back to Templates](https://eternalengineos.io/features/postframe/templates/)

Template Engine

# Handlebars Syntax

Write `{{variable}}` placeholders, `{{#if}}` branches and `{{#each}}` loops, then pass template_variables on the send call. PostFrame renders the template server-side with a fixed set of safe helpers.

[Start free](https://app.eternalengineos.io/signup?plan=free&interval=annual)[Template engine overview](https://eternalengineos.io/features/postframe/templates/)

## Template Logic

Variable interpolation

Insert recipient names, order details, and custom data with {{variable}} syntax

Conditional blocks

Show or hide content based on data with {{#if}} and {{else}} blocks

Iteration loops

Render lists of items like order line items with {{#each items}}

Safe helpers

eq, neq, gt, lt, and, or, not, uppercase, lowercase, truncate and formatDate — no arbitrary code runs inside a template

Syntax Examples

`{{firstName}}`

Simple variable interpolation

`{{#if isPremium}}...{{/if}}`

Conditional content blocks

`{{#each orderItems}}...{{/each}}`

Loop through arrays of data

`{{uppercase status}}`

Built-in text helper

## Keep exploring PostFrame

[### Live preview See the rendered result while you type. Open Live preview →](https://eternalengineos.io/features/postframe/templates/live-preview/)[### Template library Eight starting points you can duplicate. Open Template library →](https://eternalengineos.io/features/postframe/templates/template-library/)[### Version history Every save bumps the version number. Open Version history →](https://eternalengineos.io/features/postframe/templates/version-history/)

Questions

## Common questions, straight answers.

Which helpers are available inside a template?

eq, neq, gt, lt, and, or, not, uppercase, lowercase, truncate and formatDate. Handlebars runs in a sandboxed renderer, so templates cannot execute arbitrary code.

How do variables get into the template?

Pass template_id plus a template_variables object on the send call. PostFrame renders the subject and body server-side with those values before the message is queued.

Can I preview a template before saving it?

Yes. The templates API has a preview endpoint that renders arbitrary HTML with sample variables, and the editor shows a live preview as you type.

Is there an alternative to Handlebars?

Yes. A template can be typed as React Email: you write JSX, and PostFrame compiles and renders it in a sandbox to HTML plus a plain-text alternative.

## Run your business from one place.

Five plans, seventeen launch apps, one dashboard. Set up in under 5 minutes — change tiers any time.

[Start free$0 forever &bull; No card &bull; Upgrade any time](https://app.eternalengineos.io/signup?plan=free&interval=annual)[Talk to Sales](https://eternalengineos.io/contact/)

From $0 · Basic $9.95/mo · Save 20% on annual billing · Upgrade or downgrade any time
