{% for field in fields %} {% if field.type == 'Company Logo' %} {% include 'payslip/logo.html' with {'field': field} %} {% elseif field.type == 'Company Name' %} {% include 'payslip/companyname.html' with {'field': field} %} {% elseif field.type == 'Payroll Column' %} {% include 'payslip/column.html' with {'field': field} %} {% elseif field.type == 'Text' %} {% include 'payslip/text.html' with {'field': field} %} {% elseif field.type == 'Separators' %} {% include 'payslip/hr.html' with {'field': field} %} {% endif %} {% endfor %}