Create a RSS feed without a module

  Previous article Next article  

Create a RSS feed without a module

  Article optimized for CMSMS 2.x

  Last tested in: CMSMS
  Last updated: 18-11-2017
  Comments: 18

I will show you an example RSS feed in combination with the CGBlog module for CMS Made Simple. You can also use it for several other modules, like News, CGCalendar, etc. You need to change the Smarty tags in the feed template matching with the module used.

  How to use

1. Create a new User Defined Tag named "content_type"

$content_type = get_parameter_value($params,'type');
if ($content_type != '') { cmsms()->set_content_type($content_type); }

2. Create in Design Manager a new Core::Page Template named "blank", that only contains:


A2 Webhosting CMS Made Simple

3. Create a new CGBlog template "feed" and the content:

<rss version="2.0" xmlns:atom="">

<atom:link href="{root_url}/feed.rss" rel="self" type="application/rss+xml" />
<description>Your description of this feed</description>
<copyright>Your name</copyright>
<generator>CMS Made Simple</generator>

{foreach from=$items item=entry}
      {eval var=$entry->summary|default:$entry->content|strip_tags:false|escape|strip|truncate:400}


4. Create a new content page "Feed". In the options tab of the page editor you must use the new Core::Page template "blank" and set the page non-searchable, not in menu and WYSIWYG switched off!
In the page content you put:

{content_type type='application/rss+xml'}
{CGBlog number='5' summarytemplate='feed'}

Set in options tab Page URL: feed.rss

You can test your feed at

4. (optional) For the auto discovery of the feed by webbrowsers, you can add in the head of your template:

<link rel="alternate" type="application/rss+xml" title="Your title" href="" />

  Working example

Check the websites feed

Validate the RSS feed

A2 Webhosting CMS Made Simple


  Click here to leave a comment

This is a captcha-picture. It is used to prevent mass-access by robots. (see:
  « Enter the CAPTCHA code (lower case)

Your IP address will be stored on submit. I reserve the right to change or delete your response without notice!
In case of abuse your IP address will be blocked!

Can I have your attention for a moment?

Did this tutorial help you solving a problem at your (clients) website and it saved you many hours of work? Great!!
Consider buying Rolf a cup of coffee in return! [ Click here ]


CMS Made Simple - Tutorials, tips and tricks - CMSMS

Create a RSS feed without a module

  Article optimized for CMSMS 2.x

  Last tested in: CMSMS
  Last updated: 18-11-2017
  Comments: 18

A2 Webhosting CMS Made Simple