A table tag within email content is how you can utilize the data within a selected relational table from your account, rather than using contact tags, which are based on custom fields in your Maropost account. Table tags are specific to the table that you plan on utilizing within your content.
The following is a screenshot of the WYSIWYG content editor with the Table Tags drop-down highlighted:
Maropost for Marketing uses the Liquid script to display data from relational tables within the email body.
For all table tags, the middle section is the table’s name, and the end section is the field that you want to be displayed in the body of the email. The following is an example of a table tag: {{table.table_name.registered_course}}. Here, table_name is the table’s name, and registered_course is the field within the relational table that you wish to utilize.
Points to Remember
- You can have as many different table tags as you need.
- The data pulled from a relational table for any given contact is stored in a Liquid script array.
- Tables have an ‘All’ option, for example, {{table.example_all}}, that displays all of the records and fields stored in a table.
- To display all records for a contact, you will need to place the table tags inside a Liquid 'FOR' loop.
Use the Liquid Script sort filter to sort the data in alphabetical order, numeric order, or date order.
Example: Sort by posting date with the most recent date listed first
{% assign sorted_postings = table.job_postings_all | sort: 'posting_date' | reverse %}
- Only the first 100 records from the relational table will be stored for any given contact. Since personalization from relational tables is entirely data-driven, this restriction is put in place to prevent a contact from accidentally receiving an email containing thousands of records.