Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 9.1.0

While creating an automated campaign, you can retrieve content using tags.

The text should be added on the left, in the visual part of the editor.

 

C O D E

D E S C R I P T I O N

Tags available to design emails in a looping process.

{{item.Title}}

item title

{{item.Summary}}

Item description

{{item.LinkURL}}

Item URL

{{item.Image}}

Item image. Please note that if the image is not available the system will pick automatically the one in the summary.

{{item.SubTitle}}

Item subtitle

{{item.Author}}

Item author

{{item.Contributor}}

Item contributor

{{item.LinkText}}

Item link text

{{item.Category}}

Item category

Tags with double curly braces containing a specific index. Indexes are used to identify the item position and can be applied to all tags. Below some examples.

{{Contents[0].Title}}

First item title

{{Contents[1].Summary}}

Second item description

{{Contents[2].LinkURL}}

Link to third item

Etc.

 

 

How to loop a row containing one item:

 

C O D E

D E S C R I P T I O N

E D I T O R

O U T P U T

{{item.Image}}

Tag to be inserted to retrieve the image

Image Added

Image Added

{{item.Title}}

Tag to be inserted to retrieve the title

{{item.Summary}}

Tag to be inserted to retrieve the description

{{item.LinkURL}}

Tag to be inserted to retrieve the URL

Before

{% for item in Contents %}


After

{% endfor %}

Liquid to be inserted in the row

Insert this code when you want to repeat a row containing one single item. Create as many rows as content available.

Image Added

 

How to retrieve one specific content with the index:

 

C O D E

D E S C R I P T I O N

E D I T O R

O U T P U T

{{Contents[0].Image}}

Tag to be inserted to retrieve the first item.

Image Added

Image Added

{{Contents[0].Title}}

Tag to be inserted to retrieve the title of the first item.

{{Contents[0].Summary}}

Tag to be inserted to retrieve the description of the first item.

{{Contents[0].LinkURL}}

Tag to be inserted to retrieve the URL of the first item.

Before

{%if Contents.size > 0 %}


After

{% endif %}

Liquid code to be inserted in the first row

It avoids an error by verifying that the item requested exist.

Image Added

 

How to loop the row containing two or more columns:

 

C O D E

D E S C R I P T I O N

E D I T O R

O U T P U T

{{Contents[indexItem1].Image}}

Tag to be inserted in the first-row column to retrieve the image of the first item.

Image Added

Image Added

{{Contents[indexItem1].Title}}

Tag to be inserted in the first-row column to retrieve the title of the first item.

{{Contents[indexItem2].Image}}

Tag to be inserted in the second-row column to retrieve the image of the first item.

{{Contents[indexItem2].Title}}

Tag to be inserted in the second-row column to retrieve the title of the first item.

Before

{% for item in Contents %}

{% assign index = forloop.index0 | modulo: 2 %}

{%  assign indexItem1 = forloop.index0 | plus:1 %}

{%  assign indexItem2 = forloop.index0 | plus:2 %}

{%  if index == '0' %}

{%assign maxIndex = Contents.size | minus:1%}

{%  if maxIndex >= indexItem2  %}


After

{% endif %} {% endif %} {% endfor %}

Liquid code to be inserted in the first row

It allows looping the first row with new items displayed on two columns. Create as many rows as content available.

Image Added

 

How to loop the row containing one item, starting from the second one:

 

C O D E

D E S C R I P T I O N

E D I T O R

O U T P U T

{{item.Image}}

Tag to be inserted to retrieve the image

Image Added

Image Added

{{item.Title}}

Tag to be inserted to retrieve the title

{{item.Summary}}

Tag to be inserted to retrieve the description

Before

{% for item in Contents offset:1%}


After

{% endfor %}

Liquid code to be inserted in the first row

Create as many rows as content available, starting from the second item offset:1

Image Added

 

How to loop the row containing two or more columns, with a maximum number of rows, that starts uploading after a certain number of item:

 

C O D E

D E S C R I P T I O N

E D I T O R

O U T P U T

{{Contents[indexItem1].Title}}

Tag to be inserted in the first-row column to retrieve the image of the second/fifth/seventh item.

Image Added

Image Added

{{Contents[indexItem1].Summary}}

Tag to be inserted in the first-row column to retrieve the title of the second/fifth/seventh item.

{{Contents[indexItem2].Title}}

Tag to be inserted in the second-row column to retrieve the image of the third/sixth/ninth item.

{{Contents[indexItem2].Summary}}

Tag to be inserted in the second-row column to retrieve the title of the third/sixth/ninth item

{{Contents[indexItem3].Title}}

Tag to be inserted in the third-row column to retrieve the image of the fourth/eighth/tenth item

{{Contents[indexItem3].Summary}}

Tag to be inserted in the third-row column to retrieve the title of the fourth/eighth/tenth item

Before

{% for item in Contents limit:9 offset:1 %}  

{% assign index = forloop.index0 | modulo: 3 %}

{%  assign indexItem1 = forloop.index0 | plus:1 %}

{%  assign indexItem2 = forloop.index0 | plus:2 %}

{%  assign indexItem3 = forloop.index0 | plus:3 %}

{%  if index == '0' %}

{%assign maxIndex = Contents.size | minus:1%}

{%  if maxIndex >= indexItem3  %}


After

{% endif %}{% endif %}{% endfor %}

Liquid code to be inserted in the first row

It allows looping the first row with new items displayed on three columns.

Skip the first item offset:1

Items in rows are counted starting from the second one plus:1, plus:2, plus:3

Create a maximum of three rows using nine items limit:9

Image Added