Skip to content

Dynamic Content

Make your templates data-driven with variables, Liquid templating, and powerful functions.

Choose Your Path

  • New to Templates?


    Start here to learn the basics of using variables and data in your templates.

    Variables Basics

  • Know the Basics?


    Learn about data binding patterns and Liquid syntax.

    Data Binding

  • Need Advanced Features?


    Explore functions like repeat(), qrCode(), and contentBlock().

    Functions Reference

  • Learn by Example?


    Follow step-by-step tutorials to build real templates.

    Recipes & Tutorials

Quick Reference

Feature Description Documentation
{{variable}} Insert data values Variables
{% if %} / {% for %} Logic and loops Liquid Reference
parse_date, format_number Data formatting Filters & Tags
repeat() JSONPath iteration repeat()
qrCode(), barcode() Generate codes QR & Barcodes
contentBlock() Reusable blocks Content Blocks
{{tt_pageNumber}} Page numbers Page Placeholders
Culture settings Regional formatting Localization

How Dynamic Content Works

  1. Add placeholders in your template using {{variableName}} syntax
  2. Send data as JSON when calling the API
  3. Receive personalized documents with your data inserted

Example

Template:

<h1>Invoice for {{customer.name}}</h1>
<p>Amount due: {{customer.total | format_number: "C"}}</p>

API Data:

{
  "customer": {
    "name": "Acme Corp",
    "total": 1500
  }
}

Output:

<h1>Invoice for Acme Corp</h1>
<p>Amount due: $1,500.00</p>

Section Overview

  • Variables & Data


    Learn the basics of placeholders and JSON data

    Variables

  • Data Binding


    JSON patterns, nested access, array handling

    Data Binding

  • Liquid Reference


    Complete Liquid syntax quick reference

    Liquid Reference

  • Filters & Tags


    TemplateTo's custom filters and tags

    Filters & Tags

  • Functions


    Advanced functions for complex templates

    Functions

  • Page Placeholders


    Page numbers, dates, and totals

    Page Placeholders

  • Localization


    Culture settings and regional formatting

    Localization

  • Debugging


    Troubleshoot template issues

    Debugging

  • Themes


    Share CSS styling across templates

    Themes

  • Recipes


    Step-by-step tutorials

    Recipes

External Resources