This article explains how to use RSS feeds in LianaMailer newsletters. RSS feeds can be utilized either automatically or by allowing the user to manually select the content to include in the newsletter.
Basic Principles of RSS Feeds
For an RSS feed to work in a newsletter, the RSS block must contain at least one of the following variables:
$RSS:TITLE$$RSS:DESCRIPTION$$RSS:PUBDATE$
Without these, the RSS fetch will not start, and no content will be loaded into the newsletter.
Repeating RSS Content in Newsletters
RSS feed items can be included in the newsletter using a loop, which automatically repeats the news items, for example, in two columns.
Alternatively, a fixed number of items can be defined in the RSS block, such as a single main highlight.
If you are unable to bring multiple news items into the block, it is often because the RSS block has a fixed number of RSS items defined, so new items are not repeated automatically.
Common RSS Variables
Below is a list of the most common variables fetched from an RSS feed, used to present the content of an individual RSS item in a newsletter. These variables can display, for example, the title, description, link, and publication date.
Item-level variables:
$RSS:TITLE$$RSS:LINK$$RSS:DESCRIPTION$$RSS:PUBDATE$$RSS:DATE$
Eventilla Feed Dates
This syntax works only with Eventilla feeds:
$RSS:AS_DATE "eventDateStart"@format=dd.MM.y$
Channel-level Variables
Channel-level variables are used when you want to display the general title or description of the entire feed in the newsletter, for example, the name of the news source or the overall theme.
<h1>$RSS:CHANNEL_TITLE$</h1>
<p>$RSS:CHANNEL_DESCRIPTION$</p>Make sure the RSS feed has a clear channel title, as not all feeds have an informative title.
Using RSS Images
Supported image types:
<enclosure>→$RSS:IMAGE$<media:content>→$RSS:content[url]$<media:thumbnail>→$RSS:thumbnail[url]$
Images in LianaCMS Feeds
In LianaCMS feeds, images are fetched using custom variables:
$RSS:CUSTOM "picture-1"$Property names should be verified from the customer’s CMS system.
Custom Values in RSS Feeds
If the RSS feed contains custom elements in addition to the standard elements (such as title, description, link), these can be defined as custom elements.
For example, the RSS feed may include additional information that is not part of the standard, such as product price, event location, or other specialized data. These are marked with <custom> tags that include a name attribute, for example:
<custom name="price">12.34</custom>These values can be fetched like this:
$RSS:CUSTOM "price"$
Comments
0 comments
Please sign in to leave a comment.