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:
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 template below makes use of some nice RenderTags 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.
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:
<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.
To integrate this template in your project:
<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">
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!
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 ;).