How do I include multiple blogs in a single page? - Blogger help, tips and hacks

How do I include multiple blogs in a single page?

Note: This article assumes that the blogs in question are publishing via FTP to an external server.
There are a number of reasons for including multiple blogs on a single page. Perhaps you'd like to have two or three users posting at once, but don't want the posts combined in a single blog column. Or maybe you'd like to post notes and comments in your sidebar that don't fit in with the rest of the content of your blog. It's even possible (depending on your server's capabilities) to grab blog content from another server and paste it seamlessly into your existing code. The possibilities are endless, really.

Including multiple blogs on a single page can be achieved through the use of includes. Includes are a feature on many different servers and platforms, including Server Side Includes, PHP, ASP, and Cold Fusion. The type of include method you need will depend on what kind of platform your server is running and whether or not your server has the functionality set up to do so. If you're not sure which of the following techniques are right for you, please ask your system administrator.

Say you want to post a list of books you're currently reading in the sidebar of your main blog page. First you'll need to create a new blog. Log into Blogger and click "Create a new blog" link in the right column. Specify the information requested and then click on Settings to enter additional information needed there. We'll use "books.html" as the file name for this new blog.

After you've completed your settings, open the template for this new blog by clicking on Template . Remove the <html> , <head> and <body> tags, leaving only the Blogger code. It should look something like this:

<Blogger> <BlogDateHeader> <$BlogDateHeaderDate$> </BlogDateHeader> <$BlogItemBody$> <$BlogItemDateTime$> </Blogger>

Since books.html will be included within your existing page, it will use the body information provided by that file. Continue to edit the template of books.html until it matches the look you desire. Now it's time to add the includes to your page.

To add the book blog to your existing blog page, open up your main blog template and find the location in your blog's layout where you'd like the books blog to appear. Place the following line of code there, depending on your server's specifications:

Server Side Includes (SSI):
<!--#include virtual="books.html"-->

<?php include ('books.html'); ?>

Active Server Pages (ASP):
<!--#include virtual="books.html"-->

Cold Fusion (CF):
<cfinclude template="books.html">

Post and publish both of your blogs so that all the updated files are placed on your server. If you'd like to include another blog (let's say it's about the music you've been listening to), simply follow the same set of steps with a new file name ("music.html" for example). Make sure to post and publish before testing out the site.

The include lines will be visible when you view your Blog Template, but will be executed on your server when a visitor comes to your site. Instead of that line of code, the user will see the individual blog dynamically included in your page. It will appear seamless, and the user won't know you've used an include.

If you've followed all of these steps and the blog is displaying in the browser with Blogger tags instead of your posts, you may need to rename the main blog file name suffix to .shtml (for SSI), .php (for PHP), .asp (for ASP), or .cfm (for Cold Fusion). This is because your server may not allow files with the standard .html extension to be parsed for includes. Contact your server administrator if you have questions regarding what is enabled on your server.

Did you like this article ?
Subscribe to my RSS feed and get more blogging tips, Plus a lot more great advice to help your blog.

Related Posts by Categories

Widget by John
  1. 0 comments: Responses to “ How do I include multiple blogs in a single page? ”


 Subscribe in a reader

Latest Free Blogger Templates
Template 01 Template - 02 see more templates
demo - 01 demo - 02
Click here for Demo Click here for Demo How to Installed Tips
Download the Temp01 Download the Temp-2  

Blogger Help: Recent Comments


 Subscribe to Bloggers Help via RSS
Add to Technorati Favorites