Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mailchimp: How to limit number of items in the RSS to Email campaign

I have my template set up to repeat a block of html between the |RSSITEMS:| tag, but my question is how to limit the number of times that block gets repeated.

Thank you in advance.

like image 759
gdubois Avatar asked Feb 15 '23 07:02

gdubois


1 Answers

The best solution that I've found is to use MailChimps |FEEDITEMS| merge tag as it offers more granular control than the |RSSITEMS| tag. Here's a snippet for creating a repeatable block that only pulls the 5 most recent items in an automated-RSS campaign (notice the "$count=" declaration):

*|FEEDBLOCK:http://website.com/feed/|* 
   <table width="600" align="center" cellpadding="0" cellspacing="0">
       *|FEEDITEMS:[$count=5]|* 
         <tr>
            <td valign="middle" align="center"><a href="*|FEEDITEM:URL|*" target="_blank">*|FEEDITEM:TITLE|*</a></td> 
         </tr>
         <tr>
            <td valign="middle" align="center">*|FEEDITEM:DATE|*</td> 
         </tr>
         <tr>
            <td valign="middle" align="center">*|FEEDITEM:CONTENT_FULL|*</td> 
         </tr>
       *|END:FEEDITEMS|*
   </table>
*|END:FEEDBLOCK|*  
like image 196
Gotequity Avatar answered Mar 08 '23 23:03

Gotequity