Template rendering
In this example, we’ll take a look at how to render different templates that were made in our template system.
To start, create a template of type HTML in our templating system located in the admin area.
Rendering an HTML template
Create a workflow similar to the one below.
Make sure to look at the step details of steps (2) and (3).
The source code for the workflow can be found here.
Make sure that the |
Rendering a PDF template
The difference between HTML and PDF rendering is that the documentType
parameter changes to application/pdf
.
With PDFs you can also adjust the render options to modify how the final PDF is rendered.
In order to render templates as PDF documents, you need to setup PDF rendering. |
The source code for the workflow can be found here.
You can combine both types of templates to render dynamic emails with PDF attachments. The example for the workflow can be found here |