You're here: Home → Combining RSS feeds from two weblogs in Movable Type

Combining RSS feeds from two weblogs in Movable Type

This site has three different weblogs: main weblog, bookmark weblogs, and static page weblog. This is one of the great features offered by Movable Type. In the last September, I wrote a tutorial about combining the two weblogs so that they can be displayed in main index. Few things you need to know about it (that I currently used in my blog):

  • Combining two weblogs, and sorted by date of post
  • Different content output. For my main weblog, I display only the excerpt, and for my bookmark, I display the entry body.

Each weblog has its own RSS. But, is it possible to have a combined RSS feed too? The answer is: yes, you can. You can do it easily using the method of combining entries from weblog. The main difference is that the output pattern. Okey, you can take a look at my weblog RSS feed first. And, if you’re running Movable Type, and you want to combine your RSS, you follow this tutorial.

Preparation

You need to get the basic information about your weblogs, and you also need some plugins.

  • You need to know your weblog ID of the two weblogs. You can easily get the blog ID when you go into your weblog management (or from the main dashboard). You will get this link in your address bar: mt.cgi?__mode=menu&blog_id=3. It means, your weblog ID is 3.
  • Install Compare and GlobalListing plugin.

Having fun with template tags

These are some information about Movable Type installation:

  • Main weblog ID: 1
  • Bookmark weblog ID: 3

Let’s make it fast. You can use my template file.

Create a new index template. I prefer to create this template in the main weblog template. For the Template Name, you can give for example “Combined RSS”. You can choose another name. For the Output file, you can use something like: combined.xml. You need to know where you publish your output file.

You need to modify some lines in the template file I gave you. In the example, you see these lines:

<title>Orangescale.NET</title>
<link>http://orangescale.net</link>
<description>Personal Journal of Thomas Arie Setiawan. Powered by Movable Type.</description>

I do not use any template tags there. The reason is simple. In want to display those information as the RSS information. Now, take a look at the template again, and these are the explanation:

  • <MTGlobalEntries lastn="10" include_blogs="1,3"> (line 14) — This is the container of the combination. lastn="10" means number of entries to display, and include_blogs="1,3" means blog ID to be combined. You should change it based on your blog ID.
  • <description><$MTEntryExcerpt encode_xml="1" convert_breaks="0"$></a></description> (line 27) — I want to display only the excerpt for my main weblog (in my RSS). Hint: <$MTEntryExcerpt$>.
  • <description><$MTEntryBody encode_xml="1" convert_breaks="0"$></description> (line 45) — For the bookmark weblog, I want to display the entry body part. Note: I also post from del.icio.us directly to this bookmark section.

Save it, and rebuild this template. It is recommended that you check the “Rebuild this template automatically when rebuilding index templates” option in the template editing menu. Now you have a combined RSS now.

By this, your combined RSS fill will be updated if you post an entry to your main weblog. The question is that, what if there is a new entry in the second blog? Here are some solutions:

  • If you have Multiblog plugins installed, you can create a new trigger. In the main weblog plugin settings, create this trigger: “When {second blog} publishes an entry Rebuild Indexes”. Click “Save Changes”.
  • If you do not have this plugin installed, and you’re too lazy to install it, there is another method. Create a new index template in second weblogs using the same template file, and publish the output file into the same file name and location as the main weblog. By this, your combined RSS file will be updated.

Well, that’s all. You can use the combined RSS output file as your feed address, or you can burn it using Feedburner. Hey, have you subscribed to my RSS feed? :)

This entry receives 6 comments.

  1. avianto

    Hmm. I am a lazy git so I just use Yahoo! Pipes, http://pipes.yahoo.com/ , to do the dirty work =D

    Feb 15, 2007 at 1:29 am

  2. Thomas Arie

    Hell yeah! :P The thing is that I use this solution before Yahoo! Pipes was introduced. I use the pipes too, but for another purposes… :D

    Feb 15, 2007 at 1:55 am

  3. kus

    man …….

    after this , are you ready to combining 2 weblog engine?

    Feb 15, 2007 at 8:13 am

  4. /Karen/

    Where’s your template file?

    Mar 12, 2007 at 9:00 am

Custom Search

Orangescale Flickr Photostream • more →

  • Make Up by Wardah
  • Make Up by Wardah
  • Make Up by Wardah
  • Make Up by Wardah
  • Make Up by Wardah
  • Make Up by Wardah