Skip to content

Instantly share code, notes, and snippets.

@tomdavies
Forked from ryanbattles/RSS Feed
Created January 24, 2012 08:44
Show Gist options
  • Select an option

  • Save tomdavies/1668934 to your computer and use it in GitHub Desktop.

Select an option

Save tomdavies/1668934 to your computer and use it in GitHub Desktop.

Revisions

  1. @ryanbattles ryanbattles revised this gist Jan 24, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion RSS Feed
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
    <title>{exp:xml_encode}{site_name}{/exp:xml_encode}</title>
    <link>http://ee-spotlight.com</link>
    <link>{site_url}</link>
    <description>{channel_description}</description>
    <dc:language>{channel_language}</dc:language>
    <dc:creator>{site_name}</dc:creator>
  2. @ryanbattles ryanbattles revised this gist Jan 24, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions RSS Feed
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    {!--
    1. THE PAGE BODY NEEDS TO BE CHANGED TO THE APPROPRIATE FIELD NAME
    2. CHECK THE URL TITLE PATH IN THE LINKS
    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"}

  3. @ryanbattles ryanbattles revised this gist Jan 24, 2012. 1 changed file with 4 additions and 5 deletions.
    9 changes: 4 additions & 5 deletions RSS Feed
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    {!-- THE ONLY THINGS TO EDIT BELOW THIS LINE ARE
    1. THE CATEGORIES LINE COULD BE SET UP AND UNCOMMENTED
    2. THE PAGE BODY NEEDS TO BE CHANGED TO THE APPROPRIATE FIELD NAME
    3. CHECK THE URL TITLE PATH IN THE LINKS
    {!--
    1. THE PAGE BODY NEEDS TO BE CHANGED TO THE APPROPRIATE FIELD NAME
    2. CHECK THE URL TITLE PATH IN THE LINKS
    --}
    {exp:rss:feed channel="news"}

    @@ -14,7 +13,7 @@
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
    <title>{exp:xml_encode}EE Spotlight{/exp:xml_encode}</title>
    <title>{exp:xml_encode}{site_name}{/exp:xml_encode}</title>
    <link>http://ee-spotlight.com</link>
    <description>{channel_description}</description>
    <dc:language>{channel_language}</dc:language>
  4. @ryanbattles ryanbattles created this gist Jan 24, 2012.
    41 changes: 41 additions & 0 deletions RSS Feed
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    {!-- THE ONLY THINGS TO EDIT BELOW THIS LINE ARE
    1. THE CATEGORIES LINE COULD BE SET UP AND UNCOMMENTED
    2. THE PAGE BODY NEEDS TO BE CHANGED TO THE APPROPRIATE FIELD NAME
    3. CHECK THE URL TITLE PATH IN THE LINKS
    --}
    {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}EE Spotlight{/exp:xml_encode}</title>
    <link>http://ee-spotlight.com</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}