Oct 08

Forget MT:OtherBlog Let’s All Use MT:MultiBlog Instead

When my friend and I were first discussing the MT:OtherBlog tag I mentioned that it seemed to do the exact same thing as MT:MultiBlog. I couldn’t, and still can’t, figure out why there would be two different tags with redundant functions but it turns out MT:MultiBlog has a couple more bells and whistles than MT:OtherBlog that make it much more functional.

In the comments of my post on MT:OtherBlog J. Brotherlove reminded me of one serious advantage PHP includes have over using MT:OtherBlog: automatic updating. If I’m pulling content from Blog 1 with a PHP include into Blog 2 whenever Blog 1 is updated the pulled content is automatically updated on Blog 2. This isn’t the case when using MT:OtherBlog. When I update Blog 1 the pulled content on Blog 2 will not be updated until Blog 2 is rebuilt (either indexes or the entire blog depending on how you’ve got it set up). So after round 1 the score card finds MT:OtherBlog winning in the ease of use category but PHP includes winning in terms of actual useful functionality. So, a tie.

But then (again in the comments of my post on MT:OtherBlog) David Raynes dropped some incredibly helpful knowledge that turned PHP includes and MT:OtherBlog both into also-rans. Turns out David originally developed the MT:OtherBlog functionality as a plugin for an older version of Movable Type. With Movable Type 4.0 this functionality was packaged into the application as MT:MultiBlog. While on the surface MT:MultiBlog and MT:OtherBlog do the same thing (namely allow you to easily pull content from one blog into another blog) the former has a serious advantage.

The MT:MultiBlog tag gets its functionality from the MT:MultiBlog plugin and that plugin has rebuild triggering options. Whereas when using MT:OtherBlog I would have to manually rebuild Blog 2 to force it to pull the most recent content from Blog 1 when using MT:MultiBlog I can set a rebuild trigger to automatically rebuild.

Let me use this blog and Correspondence Notes again as a real world example. I want the content I’m pulling from Correspondence Notes into the footer of this blog to always be up to date. Using MT:MultiBlog I have two steps to making that happen. First step is getting the code in order:
<mt:MultiBlog include_blogs="1">
<MTEntries lastn="2">
<a href="<$MTEntryLink$>"><$MTEntryTitle$></a>
<$MTEntryExcerpt$><p>
</MTEntries>
</mt:MultiBlog>

This is of course almost identical to the code used in the MT:OtherBlog example. David rightly points out that this code could be condensed but I prefer writing it out like I have here. Just a personal preference so feel free to do it however you like.

The second step is to configure a rebuild trigger using the MT:MultiBlog plugin. Go to plugin configurations for Blog 2.

Picture 1.png

Select MT:MultiBlog 2.0, click settings and then Create Rebuild Trigger. Choose the blog that will be triggering the rebuild (in my example it’s Correspondence Notes) and configure it. I chose to rebuild the On a path indexes whenever a Correspondence Notes entry is saved.

Picture 2.png

Now my footer here at On a path will always be rebuilt when a new entry is saved at Correspondence Notes and thus my footer here will always have the most up to date content. Sweet.

Categories

,
| | Comments