Basic RSS feed

From MODx Wiki

Jump to: navigation, search


[[Ditto? &startID=`10` &format=`rss` &summarize=`20` &total=`20`]]

To create a basic RSS feed insert a Ditto call like the one above into a new Modx page.

When creating the page make sure you set the "Uses template" field to (blank) and then on the "Page Settings" tab make sure the following settings are selected:

  • Container? No
  • Rich Text? No
  • Searchable No
  • Cacheable No
  • Empty Cache? Yes
  • Content Type text/xml - This is probably the most important thing to remember

NB: &startID in the Ditto call is the ID of the folder you wish to index. On my own website I have a folder called "news" with ID=56 so the call I use is shown below.

[[Ditto? &startID=`56` &format=`rss` &summarize=`20` &total=`20` &commentschunk=`Comments`]]

If you want to have more than one RSS Source just put a ',' (Without the Quotes, of course) between every Start id like this:

[[Ditto? &startID=`56, 7, 10, 15` &format=`rss` &summarize=`20` &total=`20` &commentschunk=`Comments`]]

Then to have your rss automatically detected by your site visitors, add the following in the header of your HTML template:

<link rel="alternate" type="application/rss+xml" title="Whatever you need" href="url_of_the_above_page_with_ditto_rss_call" >
Personal tools