One RSS Feed from Multiple Weblogs or Channels
Posted March 10, 2010 @ 3:49 PM, by Marc, in BWS, ExpressionEngine — 3
Every ExpressionEngine installation comes with an RSS template that can be used to publish content from any one of the website’s individual weblogs/channels. By default, this RSS template can only publish the contents of a single weblog/channel. For example, if ExpressionEngine is setup with a Company News weblog/channel and an Upcoming Events weblog/channel, and the goal is to offer content from both via RSS, one would have to provide visitors with two separate feeds using two separate instances of the RSS template.
There are plenty of cases where providing more than one RSS feed is ideal, as it’s common for a website to offer numerous types of content that do not overlap. Look no further than Digg (60 RSS feeds as of this writing) and The New York Times (175 RSS feeds as of this writing) for typical examples. However, what if one does wish to provide a single RSS feed that has content from more than one weblog/channel? Read on…
The Case of This Website
With regard to this website, I was wondering this very thing a couple of weeks ago. Since the beginning, this website has provided an RSS feed that contained only the contents of the Blog and nothing else. While that’s both handy and dandy, I wanted to also provide the contents of the Portfolio in the same feed without asking my current subscribers to add another RSS feed to their list. So, I began the task of modifying the RSS template to publish content from more than just one weblog/channel.
Making it Work
After looking through the ExpressionEngine docs and forums, then experimenting with my own RSS template through trial and error, I figured out how to add the content from numerous weblogs/channels into a single RSS feed. What follows is a screenshot of this website’s RSS template with notes added via Photoshop, then a plain-text version that you can download and use as you wish.
The Screenshot and the Code
I should mention that the following code is used in ExpressionEngine version 1.6.8, build 20090723. I'm sure it will work just fine with most, if not all, ExpressionEngine versions 1.6.x, but I make no guarantees. Additionally, it's very likely that the following code won’t work in ExpressionEngine version 2.x.x without some additional modifications. If you’re using version 2.x.x, it may be better to edit the default template that came with your version while copying and pasting some of the code highlighted below. As usual, your mileage may vary.
Open/download the plain text version of the above file. [4kB, .txt]
Comments
-
Paul Kelley
March 10, 2010 @ 9:14 PM – #
-
Paul Kelly,
So, you are advocating breaking up the feeds into separate mini-feeds?
That is an interesting viewpoint!
I suppose one could offer two feed buttons on a page - one to subscribe to the entire site’s feeds, and another to subscribe only to that content area’s feed.
I think I might ASK my subscribers if they prefer that in a blog post, or at least track my clicks in the two varieties of feed buttons.
Terry Britton
Terry Leigh Britton
March 11, 2010 @ 5:48 PM – #
-
Don’t forget you could use {comment_url_title_auto_path} instead of having to code multiple if:else and title_permalink sections.
Sorry, comments are now closed.
Related Entries
-
Request a Quote Forms: Good or Bad?
August 23, 2010 — 6
-
A Summer Internship
June 11, 2010 — 8
-
ExpressionEngine’s Deny Duplicate Data Preference
March 11, 2010 — 1
-
3 Things About 5, Starting on the 1st
October 13, 2009 — 6
-
Moving Across the Ocean
September 03, 2009 — 6
-
Comparing Apples to Oranges
July 20, 2009 — 18
-
Recreating bostonwebstudio.com
July 07, 2009 — 3
Blog Categories
Twitter Updates
Follow us: @bostonwebstudio



I think it’s great to have one comprehensive RSS feed for those who want it. I think it’s equally important to provide individual feeds for each section as well. In these times of Twitter, Facebook and other social networks we’ve become accustom to only seeing the content we choose to see. The absence of that choice may cost someone subscribers.