Combined Entries from All Your Blogs

| | Comments (2) | TrackBacks (0)

!! This tutorial is obsolete. The MT plugin multiblog will do all this and more ... it's FANTASTIC! Click here to get it! !!

I've gotten several emails asking how I combine entries from all my different blogs onto my main index page, with each type of entry having its own display settings. There are lots of tutorials already available out there - but here's the way I did it.

Setting up your main index page like this will allow the entries from all your blogs to be displayed in chronological order on your main index page. It also allows you to have each blog's entries display in a different way.

For instance, on my site, I am showing four blogs content on the main page - Regular blog entries, Reviews, Links and Odds & Ends. The Reviews entries have lots of MTAmazon info included, the Links entries and Odds & Ends entries are extremely short - with just the entry title and extended entry field showing. I didn't want a full big entry displayed when all I was doing was linking to a funny picture on yahoo or adding a new design resource site to my links database.

Requirements:

MT 2.661 or higher

Plugin: MTSQL

Plugin: MTCompare

These instructions are assuming you have three blogs you want to aggregate.

Replace your MTEntries tags (and everything in between) with:

[code]<$MTEntryTrackbackData$>[/code]
[code]<$MTEntryTitle$> <$MTEntryBody$>[/code]
[code] <$MTEntryTitle$> <$MTEntryBody$>[/code]
[code]<$MTEntryTitle$> <$MTEntryBody$>[/code]
[code]
[/code]

Edit the MTSQLEntries tag ...

The 1,8,5 determines which blog entries to aggregate. Replace those numbers with the id numbers of the blogs you want to include.

desc limit 0,10 represents how many total entries to show on the main page. So if you want 20 entries to show up - you'd put desc limit 0,20

Setting up each blogs display

Now for each blog you're including -- you'll set up one of these within the MTSQLEntries tags. (I've only put the most basic of MT Info for the blog entry. Put as little or as much as you want to display). If you're including THREE blogs, you'll have three of these within the MTSQLEntries tags.

[code] <$MTEntryTitle$><$MTEntryBody$>[/code]

The b="__" should correspond to the blog id. So if your reviews blog ID is 8 , b="8".

Automatically Updated Index Page

Now you need to make a few changes in your MT set up so that anytime you post a new entry to any of your blogs -- the main index page is updated. If you don't do these changes ... then the only time your main index page will rebuild to include the other blogs entries is when you post an entry to the MAIN blog. (Make sense?)

This is how I get my MT to do it:

My main blog's Main Index Template (with the new MTSQLEntries and MTIFEqual tags) is set to OUTPUT to index.php. The template is LINKED TO FILE in Templates/index.txt.

Screenshot of Main Blog's Template Setup:

In all the other blogs that I want to include on the main page - I set up a New Index Template. I call it "Combined Entries". It OUTPUTS to ../index.php (so it goes outside it's folder, and rebuilds the same index.php that my main blog rebuilds.). The template is LINKED TO FILE in ../Templates/index.txt (so it goes outside it's folder, and grabs the template from the MAIN BLOG's template).

Screenshot of All Other Blogs Template Setup:

Once each blog you want to include has this new index template set up - that is linked and outputs to the same file as the main blog - any time you post an entry to any of these blogs - it automatically rebuilds the index page.

(FYI - I also have my rss feeds set up this way. So that when I post a new entry in any of my blogs - my rss feed is rebuilt.)

0 TrackBacks

Listed below are links to blogs that reference this entry: Combined Entries from All Your Blogs.

TrackBack URL for this entry: http://www.silverberry.org/x/mt-tb.cgi/1693

2 Comments

hei that's good.it'll give me a sort of help.

This tutorial isn't necessary anymore with great plugins like Multiblog and Global Listings. Check the Movable Type Plugins site for the latest versions of these plugins!!

Leave a comment

Archives

Pages

Powered by Movable Type 4.1

About this Entry

This page contains a single entry by Lacy published on June 23, 2004 3:44 PM.

Got Gmail ? was the previous entry in this blog.

The Dysfunctional Section of a Hallmark Store is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Flickr