0

Is it possible to create an RSS feed with Solspace Calendar. The RSS sample in EE used channels entries. Wondering if I can pull in events from a calendar into an rss feed.

This feed needs to also show all repeating events. I got it started but it only shows one event for a repeating event in my rss reader.

{exp:rss:feed channel="calendar_events"}

<?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/">

    <title>{exp:xml_encode}{channel_name}{/exp:xml_encode}</title>
    <link>{channel_url}</link>
    <description>{channel_description}</description>
    <dc:language>{channel_language}</dc:language>
    <dc:creator>{email}</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://ellislab.com/" />

  {exp:calendar:cal calendar_id="22" event_limit="24" date_range_start="today" show_months="6" pad_short_weeks="n" dynamic="off"}
<item>
      <title>{exp:xml_encode}{event_title}{/exp:xml_encode}</title>
      <link>{path='events'}/{event_id}/</link>
      <guid>{path='events'}/{event_id}/#When:{event_start_date format="%H:%i:%sZ"}</guid>
      <description><![CDATA[{event_summary}]]></description> 
      <dc:subject>{exp:xml_encode}{categories backspace="1"}{category_name}, {/categories}{/exp:xml_encode}</dc:subject>
      <dc:date>{event_start_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
    </item>
{/exp:calendar:cal} 

</rss>

{/exp:rss:feed}     

This code displays 3 out of 4 events (only one of the repeating events in Chrome RSS reader, it doesn't work at all in Firefox. Only shows the feed title and no events. Firefox says the rss feed is empty)

0
{exp:rss:feed channel="calendar_events"}

<?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}CHP Events{/exp:xml_encode}</title>
    <link>{channel_url}</link>
    <description>CHP Events List</description>
    <dc:language>{channel_language}</dc:language>
    <dc:creator>{email}</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://ellislab.com/" />

  {exp:calendar:cal calendar_id="22" event_limit="24" date_range_start="today" show_months="6" pad_short_weeks="n" dynamic="off"}
<item>
      <title>{exp:xml_encode}{event_title}{/exp:xml_encode}</title>
      <link>{path='events'}/{event_id}/</link>
      <guid>{path='events'}/{event_id}/#When:{event_start_date format="%Y-%m-%d %g:%i:%s"}</guid>
     <description><![CDATA[{event_summary}]]></description> 
      <dc:subject></dc:subject>
      <pubDate>{event_start_date format="%D, %d %M %Y %H:%i:%s"}</pubDate>
      <dc:date>{event_start_date format="%Y-%m-%d %g:%i:%s"}</dc:date>
    </item>
{/exp:calendar:cal} 

</channel>
</rss>

{/exp:rss:feed}                     
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.