[ic] RSS feeds with IC

Joshua Lavin joshua at kingdomdesign.com
Mon Apr 5 15:08:41 EDT 2004

Hey everyone,

This is something new I'm trying, and I thought it'd be fun to share. I 
wanted to get an RSS feed of what's new on our site, but this could be 
used for any list.

I created a new page in [catroot]/pages, called 'rss.xml.html', with 
the code below (although I don't think it needs the second line). It is 
pulled up without the html extension, so 
http://shopalert.us/shop/rss.xml gets the feed. (Note that some fields 
here are not IC defaults.)

[set mv_add_do_html]0[/set]
[calc] $Config->{HTMLsuffix} = '.xml'; return[/calc]
[tag op=header]Content-type: text/xml[/tag]
<?xml version="1.0" ?>
<rss version="2.0">

     <title>ShopALERT What's New</title>
     <description>ShopALERT: Newest Items Added</description>
     <copyright>Copyright 2004 ALERT</copyright>
     <lastBuildDate>[time]%a, %d %b %Y %H:%M:%S %Z[/time]</lastBuildDate>
     <webMaster>sum at gui.com</webMaster>

     [query sql="select SKUID, FullDescription, Department, Category, 
RetailPrice, SKUPicText from products order by SKUID desc limit 15" 
table=products type=list]
         <title>[sql-field FullDescription]</title>
         <description><![CDATA[<strong>[sql-field Department]: 
[sql-field Category]</strong><br /><br />
         [sql-field SKUPicText]<br /><br />


Josh Lavin
Kingdom Design   http://www.kdw.us/

More information about the interchange-users mailing list