February 12, 2005

Combining Multiple Blogs Into One

There are several situations in which you might want to combine two or more blogs into one. You might want to create a "Portal" blog which displays the most recent entries or headlines of entries from various blogs. You might want to create a Sideblog or Linkblog (see tutorial). Or you might want to have what looks to be just one blog (such as Learning Movable Type) but is actually a combination of several.

The tools you have at your disposal are David Raynes' MultiBlog plugin, PHP Includes, SSI - Server Side Includes, and RSS, among others. This tutorial will focus on the easiest of these alternatives - how to use the MultiBlog plugin to combine blogs from a single installation of Movable Type.

Displaying Entries from Other Blogs

If you have several blogs on the same Movable Type installation, it is fairly easy to pull entries from one or more into another.

1. Install MultiBlog.
Download and install the MultiBlog plugin.

2. Adjust your Main Index Template.
Replace the MTEntries Tags (<MTEntries> and </MTEntries>) with <MTMultiBlogEntries include_blogs="1,2,3"> and </MTMultiBlogEntries>. In place of "1,2,3" pick the blog IDs of the blogs you wish to show. To find the blog ID, click on the blog name from the list of your blogs in your Movable Type edit window. The blog ID will appear in the URL bar of your browser, like so: http://www.yoursite.com/cgi-bin/mt.cgi?__mode=menu&blog_id=1. If you add a "lastn" attribute, for example, lastn="10", the list of entries will include the last 10 entries from all the blogs you selected combined.

3. Adjust the Rebuild Control.

(Click to enlarge.)

One very helpful feature of MultiBlog is that you can direct the indexes of one blog to be rebuilt when an entry from another blog is saved. For example, when I save a new entry in the LMT Announcements blog, the index templates for Learning Movable Type are rebuilt, so that the LMT Announcement entry shows up on the main page of Learning Movable Type.

To set this up, click on the MultiBlog link in the "Configure Active Plugins" section at the bottom of your Main Movable Type edit window.

4. Adjust MT Search Form
If you have an MT Search bar on the main page of the blog in which you are pulling in entries from other blogs, you might want to extend the search capabilities so that when your visitor performs a keyword search, the search is pulling from your other blogs as well. To do this, add the following lines to your search form code:

<input type="hidden" name="IncludeBlogs" value="1" /> <input type="hidden" name="IncludeBlogs" value="3" />

In this example, the search form would search blogs with the IDs 1 and 3. (See MT Keyword Search tutorial for more information on customizing MT Search.)

Using Multiple Blogs Seamlessly as One Blog

I have been asked several times how I set up the templates of the LMT Links and the LMT Announcements such that they behave differently than the other entries in Learning Movable Type. The answer is that they are separate blogs, which all look like one blog because of using MultiBlog and PHP includes. On Learning Movable Type, I have set up my Main Sidebar and the Individual Entry Sidebar as index templates, with .inc extensions, so I can use PHP to include them into the Main Index and Archive templates. (See Using PHP and MT Includes tutorial.) I have set up the Banner, the Navigation elements, and the Footer as separate Template modules, which I also use PHP to include into the Main Index and Archive templates of Learning Movable Type. In the LMT Links and LMT Announcements blogs, I simply use PHP to include the very same .inc files to create the sidebar, navigation, banner, and footer elements. I use MultiBlog to pull in the most recent announcement to the main page of Learning Movable Type. (See Keeping an Entry at the Top tutorial.)

Merging Your Blogs - at Movalog.

Has this tutorial been helpful? Please consider linking to Learning Movable Type at http://learningmovabletype.com/ . Thanks!

Posted by Elise Bauer on February 12, 2005 to General Tips and Tricks
Comments(6) | Email to a friend | Printer-friendly version


If you would like to send a trackback
please use the following URL: http://learningmovabletype.com/cgi-bin/mt32/mt-tb.cgi/397


It figures you would write this just as I start planning MultiBlog 2.0, including completely reworking the interface among other things. :)


What if I just wanted to post excerpts from my other blog on the front page?

Here is what I have: I have a front page where the majority of postings are. I have several other authors on some back pages that post every now and then. I would like to be able to display an excerpt of their postings on the front page whenever they post something to one of the back pages.

Out of curiousity, is there a way to do this where the trackbacks from the linkblog/sideblog can point back to the main blog rather than to the linkblog?

Thanks. And btw, I'm a long time lurker here, and cannot tell you how helpful your site has been. So thanks grande for all of it.

Great look at this, just wanted to say that I use MultiBlog more than any other plugin! I have several sections on my blog- photos, books, ect and each of them is set up with a different blog so I have more control over their individual templates but I use MultiBlog to pull them all together.

The only area I find that it has problems is when I try to combine category archives across blogs � just wasn�t built to do this.

Following on from Sean's comment, is there any way to combine archives? I want all of the posts in blog 1 to show up in the sidebar of blogs 2 and 3...

The MultiBlog link on the 6A plugin site is wrong. It's actually located here: http://www.rayners.org/plugins/multiblog/

Post a comment

(Before posting a comment please see the Comments and Trackbacks Policy. Do you need help troubleshooting your weblog? Please post questions and requests for support at the MT Support Forums. Thanks!)

Remember Me?

(you may use HTML tags for style)

Email to a friend

Email this article to:

Your email address:

Message (optional):