Practical examples for rendering output with the Render a Template Transformer, using variable interpolation, loops, conditionals, and built-in filters.
Overview
The Render a Template Transformer renders Twig templates using supplied data to produce formatted output strings, such as order confirmations, emails, CSV rows, or HTML/XML blocks. For safety, only theif and for tags are supported, along with a fixed set of filters: abs, batch, capitalize, default, escape (e), first, format, join, keys, last, length, lower, nl2br, number_format, replace, reverse, round, striptags, title, trim, upper, and url_encode.
Render a confirmation message
Loop over items to build a CSV block
Use a conditional fallback
Only the
if and for tags are available in the Render a Template Transformer. Constructs like {% set %} are not supported.