Skip to main content

Layouts and Templates

Layouts and templates are used to create the export for a given file format.

Template engine​

Whenever an export has to be made, kwilo uses the Smarty Template Engine to render templates and layouts.

Rendering lifecycle​

kwilo has the following lifecycle when creating exports:
StepDescription
LoadLoad template data with help of GraphQL. Per template, you can overwrite the GraphQL query.
Render
  • If the template's layout has a header, render the header with Smarty
  • Render the template with Smarty
  • If the template's layout has a footer, render the footer with Smarty
ConvertIf output is of type XLSX or DOCX, convert the rendered HTML into XLSX or DOCX
SendSend the output to the user's browser