a neat way to automatically rebuild other blogs
People often like to include content from external sites on their blogs, such as pulling in a newsfeed by RSS, or just displaying recent posts on their own other blogs. Since MT generates static pages, the blog won't be updated when the external content changes but only when a new entry is added to the blog or it is otherwise rebuilt.
A variety of solutions have been proposed for this, suiting different needs. I recently came across a solution that works perfectly for me. It's not the only solution to the problem, but it's the easiest one.
On the what's new page of my static website, I list recent posts to my blogs along the sidebar. I do this using the OtherBlog plugin for this. I could also use PHP but that would require creating a template in each of those other blogs and then including it on the what's new page. Using OtherBlog, I only have to create one template, the what's new template. Much easier.
The problem is that the what's new page doesn't rebuild automatically when the other blogs are updated. I tried using various rebuild scripts for MT that are out there but I had problems setting them up to run as cron jobs.
However, the Rebuild plugin provides a solution, in conjunction with the OtherBlog plugin.
On each of the blogs that I post to regularly, I include the following code somewhere in the main index template:
<MTOtherBlog blog_id="9">
<$MTRebuildIndex template="Main Index"$>
</MTOtherBlog>
This code tells MT to take action in the what's new blog (which has a blog id of 9) and then to rebuild the index template called "Main Index" there. This occurs whenever I post to the other blogs. Sweet!
Added: I'm also doing this to rebuild the Al-Muhajabah's Islamic Blogs main index page, which lists recent entries to some of my other blogs. The same technique applies as above.
Subscribe to this blog's feed