All Collections
Automation
Templates
How to create a custom table in Kolleno?
How to create a custom table in Kolleno?

This article will take you through step by step how you can create a custom table that you an add into your templates.

Adonis Damalis avatar
Written by Adonis Damalis
Updated over a week ago

Below are the steps to add in a custom table to your communications in Kolleno.

This can be added to any template created and can be utilised instead of the generic table smart fields.

How to add in the source code?

  • This can be done by clicking on “source code” in the text editor:

Please note! Your Customer Success Manager will provide the source code required - the below is an example.

  • Then copy/paste this code or contact your Kolleno account manager to get help. As you notice, we recommend setting a fixed width of 800px and then sub-dividing by clearly setting the px size of each column.

    <table style="border-collapse: collapse; width: 800px;" border="1">
    <tbody>
    <tr style="word-break: break-word;">
    <th style="width: 120px;">Ref</th>
    <th style="width: 160px;">Invoice Date</th>
    <th style="width: 200px;">Property Address</th>
    <th style="width: 160px;">Balance &pound;</th>
    <th style="width: 160px;">Due Date</th>
    </tr>
    </tbody>
    </table>
    <p style="margin: 0px;">{% for i in invoices %}</p>
    <table style="border-collapse: collapse; width: 800px; margin-top: 0px; border-top: none;" border="1">
    <tbody>
    <tr>
    <td style="width: 120px; border-top: none;">&nbsp;{{ i.ref }}</td>
    <td style="width: 160px; border-top: none;">{{ i.date_invoice|date:"d.m.Y" }}</td>
    <td style="width: 200px; border-top: none;">{{ i.source_original_data.CustomField.0.StringValue }}</td>
    <td style="width: 160px; border-top: none;">{{ i.balance }}</td>
    <td style="width: 160px; border-top: none;">{{ i.date_due|date:"d.m.Y" }}</td>
    </tr>
    </tbody>
    </table>
    <p style="margin: 0px;">{% endfor %}</p>

  • Click Save, then you will see the table in the template (as shown below):

  • Select preview to view the table:

Please note in Row 10 of the source code above:

To include only invoices selected:

That in {% for i in invoices %} will only include the invoices selected as part the email.

It is also possible to do include

To include invoices due or invoice overdue for the selected:

{% for i in invoices_due %} or invoices_overdue for the selected ones that are either due/overdue

To include all invoices:

{% for I in invoices_all %} for all invoices due/overdue, no matter if they are selected or not.

Invoices_all_due and invoices_all_overdue are also available.


Did this answer your question?