Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example ExpressionEngine RSS template for creating a feed of all your recent comments, reverse date ordered
{assign_variable:master_weblog_name="journal|linklog|sidebar"}
{exp:rss:feed weblog="{master_weblog_name}"}
<?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>{exp:xml_encode}My Comments Feed{/exp:xml_encode}</title>
<link>http://www.example.com/</link>
<description>Comments on my site</description>
<dc:language>{weblog_language}</dc:language>
<dc:creator>rss@example.com</dc:creator>
<dc:rights>Copyright {gmt_date format="%Y"}</dc:rights>
<dc:date>{gmt_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
<admin:generatorAgent rdf:resource="http://expressionengine.com/" />
{exp:comment:entries weblog="{master_weblog_name}" dynamic="off" sort="desc" limit="20"}
<item>
<title>{exp:xml_encode}{name} commented on {title}{/exp:xml_encode}</title>
<link>http://www.example.com/system/</link>
<guid>http://www.example.com/system/#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
<content:encoded><![CDATA[{comment}]]></content:encoded>
<dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
</item>
{/exp:comment:entries}
</channel>
</rss>
{/exp:rss:feed}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.