Skip to content

Instantly share code, notes, and snippets.

@ryanbattles
Created January 24, 2012 01:39
Show Gist options
  • Save ryanbattles/1667191 to your computer and use it in GitHub Desktop.
Save ryanbattles/1667191 to your computer and use it in GitHub Desktop.
RSS Feed
{!--
1. THE CHANNEL AND FIELD NAMES NEED TO BE CHECKED FOR ACCURACY
2. THE DYNAMIC LINK PATHS NEED TO BE CHECKED FOR ACCURACY
--}
{exp:rss:feed channel="news"}
<?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/"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{exp:xml_encode}{site_name}{/exp:xml_encode}</title>
<link>{site_url}</link>
<description>{channel_description}</description>
<dc:language>{channel_language}</dc:language>
<dc:creator>{site_name}</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>
<atom:link href="{path="rss"}" rel="self" type="application/rss+xml" />
<admin:generatorAgent rdf:resource="http://expressionengine.com/" />
{exp:channel:entries channel="news" disable="pagination|trackbacks|categories" dynamic="off" limit="20"}
<item>
<title>{title}</title>
<link>{url_title_path="news"}</link>
<guid>{url_title_path="news"}</guid>
<description>
<![CDATA[
{news_body}
]]>
</description>
<pubDate>{gmt_entry_date format="%D, %d %M %Y %H:%i:%s %T"}</pubDate>
</item>
{/exp:channel:entries}
</channel>
</rss>
{/exp:rss:feed}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment