Help - Search - Members - Calendar
Full Version: TWO blogs on one page?
Movable Type Community Forum > Additional Resources > Tips and Tricks
Milohoss
Rocking!  So I want to create a revolutionary double blog with two blogs (in two collumns) on one page.  I could easy do this by framing one or both blogs, but I would prefer to avoid such a method. Has anyone successfully hacked MT to allow two, inderpendant blogs to exist on one page?
kadyellebee
The easiest way to do this involves PHP or SSI - do you have access to either of these on your host?  

If so, you can designate one of the blogs to be the "main" one, and use includes to put the data from the "secondary" blog inside of the main blog.  You'd want to scale back your templates on the secondary blog to be only the data, no body or head tags, because it will inherit these from the main blog when its included.

here's a sample of php include code:
CODE
<? include('/home/USERNAME/public_html/2ndBlog/index.html'); ?>
 
You'll need to change the extension of your main blog to be .php so browsers knows how to use the code.

Post back if you still have questions!
Kristine
nita
Could both authors post in the same blog, but under different primary categories? Then you could display each category in its own column.
dphuz
you can post different categories for the same blog in separate columns?  so, theoretically, if i put my pictures in a distinct category, i could publish them directly to a little photo sidebar without having to create a separate photoblog and use ssi? that would be awesome.  how?
kadyellebee
The main issue with this is that many photoblogs use some techniques to make it easy for them to display the pictures - like putting the URL in the MORE entry section and then using an image tag with that code in it to display it.  So your Archive pages might look oddly with these type of entries mixed in.

You could do something like this:
CODE
<div id="content">Journal<br>
<MTEntries category="journal">
<$MTEntryBody$> (and any other tags you wanted)
</MTEntries>
</div>
<div id="links">Photos<br>
<MTEntries category="photos">
<$MTEntryBody$> (and any other tags you wanted)
</MTEntries>
</div>

You might want to look at a photoblog tutorial to get some good ideas of how to easily use code to put them in the sidebar - blogstyles.com would use this method inside the MTEntries category="photos"
CODE
<a href="<img src="<$MTEntryMore convert_breaks=0$>" alt="<$MTEntryTitle$>"><br>


Hope this gives you some good places to start smile.gif

Kristine
kiyoaki
Hello !

Does anyone know where it is possible to find a step by step guide to building a double blog using php, something like the suggestion made by Kadyellebee ? There doesn't seem to be any around.
It would be something really simple. There wouldn't be two bloggers, I in fact would like to blog on two separate parts of the same page.
kiyoaki
Here's a question: huh.gif how do I re-edit my main index and stylesheet templates so I can include a 'secondary' blog inside the main blog ? The two blogs won't be identical twins dividing the page into two equal halves reflecting each other in layout, like .

It would resemble more a photoblog: the larger part of the page would be devoted to the 'journal' part, while on the right, instead of pictures displayed, would be more text, that I intend of a different nature. It would be less bulky in size, and complementary to the journal part. Do I need tables ? or different containers ? can I get these to have attributes and properties like they were fonts or links ? sad.gif

Oh, and thanks, Tim ! If I can't do this by myself, I mean, by myself with some help, I'll definitely try
Nucleus. But looks to me what I'm after is of a less demanding nature, hence should recquire only some extra coding, albeit much hair-scratching from my part.
NSF
I wanted the same feature and added a post here and someone told me to use this...
OtherBlog

That should help you with out PHP...
wink.gif
kadyellebee
I use PHP to intergrate info from multiple blogs, and some of my notes for doing that are up on Blogstyles' Portal Tutorial. Its a bit more focused towards excerpts of blogs, but I have examples of how I include my most recent photoblog entry that might give you ideas as well.

Kristine
kiyoaki
Thank you for pointing that out to me.

So, I opened an up.html file in each blog, pasting in it the code you wrote, first, for the main blog, then for the secondary blog. Then I pasted relevant parts from the last source example displayed in the tutorial in the Main Index templates of the two blogs.
When checking main test blog, there are two blogs, but data is identical and comes from the main blog. When checking the URL for the secondary blog, it displays one blog, which I guess is as it should be, since the secondary blog is not meant to be visited alone.

Please, what should I do here, doctor, in order for the secondary blog part of my main site to really display the content coming from my secondary blog ?

An aside question: I see you can write in different categories. Say, you only want to make up two categories and display them in two separate columns simulteously on your weblog page. So that when you write a new entry and select to put it in category 'a', it goes in the left column, and when you select category 'b', it goes right to the right one. It seems simpler than two blogs, but is it feasible ?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.