The following is a RSS 2.0 template for a gallery. It includes the last 10 images posted to the gallery.
{assign_variable:gallery_name="gallery"}
{assign_variable:gallery_template="gallery"}
{exp:rss:feed weblog="default_site"}
<?xml version="1.0" encoding="{encoding}"?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{weblog_name}</title>
<link>{weblog_url}</link>
<description>{weblog_description}</description>
<dc:language>{weblog_language}</dc:language>
<dc:creator>{email}</dc:creator>
<dc:rights>Copyright {gmt_date format="%Y"}</dc:rights>
<dc:date>{gmt_date format="%Y-%m-
T;%H:%i:%s%Q"}</dc:date>
<admin:generatorAgent rdf:resource="http://www.pmachine.com/" />
{exp:gallery:entries gallery="{gallery_name}" orderby="entry_date" rows="10" columns="1"}
{entries}
{row}
<item>
<title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
<link>{id_path={gallery_template}/image_full}</link>
<description>{exp:xml_encode}{caption}{/exp:xml_encode}</description>
<dc:subject>{exp:xml_encode}{category}{/exp:xml_encode}</dc:subject>
<content:encoded>
<![CDATA[<a href="{id_path={gallery_template}/image_full}">
<img src="{thumb_url}" width="{thumb_width}" height="{thumb_height}" alt="{title}" style="border: 0;" /></a>
{caption}]]>
</content:encoded>
<dc:date>{gmt_entry_date format="%Y-%m-
T;%H:%i:%s%Q"}</dc:date>
</item>
{/row}
{/entries}
{/exp:gallery:entries}
</channel>
</rss>
{/exp:rss:feed}
NOTE: you still need to keep in a weblog name. The weblog info drives what you see in the following fields:
<title>{weblog_name}</title>
<link>{weblog_url}</link>
<description>{weblog_description}</description>
If you create a weblog for your gallery, you’ll be able to set the values of the name, url and description. You don’t neccesarily need to use the weblog on your site, but you will need to put a dummy entry in the new weblog, otherwise you will get an error on your feed.
So set this line:
{exp:rss:feed weblog=“default_site”}
to
{exp:rss:feed weblog=“galleryweblogname”}
Category:RSS Category:Image Gallery
