rdb-how-to-rss.png

rdb: Creating RSS Feed in RedDot CMS

This is a classic article about how to create a RSS Feed using our beloved CMS and this topic has been asked about 5 million times now on Google Groups Wiki and everywhere else… This question or furthermore one of these variations below will now be answered:
 

How to get an RSS Feed for my Open Text project?

  • How do I create an RSS Feed in Open Text Web Solutions Management Server?
  • How do I set up an Podcast?
  • How can I create a news feed for my news section?
  • How do I get my news list as a XML document

To create an RSS Feed within RedDot CMS you just need ONE template.
There is no need to create a separate XML variant or anything like this.
Just change the elements within the template to match your news elements and you are ready to go.
Don’t change the date element, this is a sensitive one which needs some ASP script to read a proper readable date for the RSS Feed.
 

The RSS Feed Template

The template below makes use of some nice Render Tags which you should check out. Especially the Render Tag described in the SEO article come in handy when you link news from different sections within the project connected to your RSS feed list using keywords.
 

Explanation of RedDot Elements

So what did we do here? Let’s have a closer look at the single bits and pieces within the template.
The first part contains two ASP functions “GetMonthName” and “GetDayName” to render the date returned by the RedDot element stf_pageDate properly in a RSS format. So DON’T TOUCH THE stf_pageDate element.
Then we have this part in the links:

 Content-Class 
 <link><%stf_siteURL%><%!! Escape:HtmlEncode(Context:Indexes.GetIndexByPageId(Guid:<%info_PageGuid%>).Page.GetUrl()) !!%>

The siteUrl element should be the URL of your site (for example: www.reddotcmsblog.com if this would be your site..)
The second Render Tag bit returns the MainLink of the page to the linked site no matter what publication package is assigned to the RSS Feed.
All the other bits and pieces should be self-explaining.
 

Integration into my Open Text project

To integrate this template in your project:

  1. Download the template below
  2. Donate a decent amount to keep this site running
  3. Import the template into your project
  4. Make sure PreExecute is activated for your project
  5. Create a page based on this template
  6. Reference the list inside the template to your news list
  7. Create a publication package for the RSS Feed list so that your pages get published into a hidden folder (this is to avoid double indexed files in your site search)
  8. Change the filename to yourfeedname.xml
  9. Integrate the file into your HTML page templates with something like this
     HTML 
     <link rel="alternate" type="application/rss+xml" title="MySite RSS Feed powered by RedDotCMSBlog.com" href="http://www.reddotcmsblog.com/anc_link_to_feed_page_in_your_project">
    
    
  10. Publish everything
  11. You are done. Get yourself a Cookie!
     

Disclaimer & Credits

Feel free to re-use the code linked below. Don’t use the code above because it is just an example and it gets scrambled by the Syntax Highlighter. However both versions come with no warranty. When re-used by you we expect you to attribute this work and use it according to the CC license BY-SA 3.0. Thanks to the famous Plugin Developer and super coder Kim Dezen who helped me out with the code bits but hates writing other things than pretty code so I have to do it.
It also needs to be said that this example is a very basic one and you can enhance any fields you need. Feel free to send us your examples if you have improved this marvelous Open Text solution!
 

Download and Feedback

We can’t get around to outline it and remind you.
So grab your code, enjoy the work we share here with you and if you find it useful then after downloading the template feel free to give us some feedback ;).