How to hack: Add tabs to your blogger posts


See this post for the final effect, which basically looks like this:

The advantages:

  • You can keep your post length short and still add a lot of content to your posts.
  • The tabs are loaded along with the original article and it wont take anytime (zero time) for the user to switch between any of the pages.
  • Can be applied in 5 mins.
Request: Please dont remove my sitename from the hack.Here is how to do it:

  • Step 1: Go to the Template-->Edit Html---> Click download full template to take a backup of your original template in case anything goes wrong.
  • Step 2: Add this code just before the /head> section of your template:
<script src='http://mp3mohit1.googlepages.com/tabbed.js' type='text/javascript'>
</script>
<link href='http://mp3mohit1.googlepages.com/tabbedstyle.css' rel='stylesheet' type='text/css'/>
  • Step 3: Go to Settings--->Formatting-->Post Template and enter the following:

<div id="cyclelinks"></div>
<p class="dropcontent">
Content 1 here.
</p>
<p class="dropcontent">
Content 2 here.
</p>
<p class="dropcontent">
Content 3 here.
</p>
<div id="cyclelinks2" align="right"></div>

Never touch the div tags. The code is self explanatory. The Content 1,2 and 3 are displayed in Pages 1,2 and 3 respectively.

  • Step 4: Save the template and you are done. Whenever you create a new post you will see the above layout.Just put the contents accordingly. If you dont want any pages in a post, simply delete all the above code from the new post.
  • Step 5: Changing the color of tabs:
Download the js file from: http://mp3mohit1.googlepages.com/tabbed.js and open it in your HTML editor. Find and change the following lines accordingly

var showrecords=1 //specify number of contents to show per tab
var tabhighlightcolor="white" //specify tab color when selected
var taboriginalcolor="lightgrey" //specify default tab color. Should echo your CSS file definition.

After you are satisfied with the changes, save the file and upload it to your location choice. Remember to change the link in Step 2 accordingly.


If you have any doubts, I would be more than happy to help you out. Just drop a comment below or use the contact me form to send a mail to me. I will appreciate it if you dont remove the link to my site, since it is harmless to me and valuable to me.

Source

<span class=

Digg!

16 comments:

Handoko said...

Hi.. I'm Handoko from Indonesia.
I just found your blog from Mybloglog. Its very usefull & interesting blog.

I'm a newbie about this things. There are some questions :
1. In Step 3, in my Post Template Box, I already have this tag :

span class="fullpost


/span

I use it to create "Read More" in my Post. So, what should I do with this? where should I place your code?

2.In Step 5, can u explain more specific to me? What is HTML Editor?
U said :"... and upload it to your location choice." where? I am afraid I will do mistake.
-"...Remember to change the link in Step 2 accordingly" What Link? Which one?

Thats all for now. Sorry to ask u many questions. Hope u dont mind.

Thanks a lot.
Handoko

PS: I've put a link to your blog. would u link back? thanks again.

Basketer said...

Hi handoko, i am glad you are trying to clarify your doubts. here are the answers:

1. For now dont put the code of read more hack and this inside each another. You can keep them like this in the post template:
read more code
body part 1
this code
body part 2

Just dont mix both for now

2.For an html editor just go to google and type html editor and download anyyone you like. It is used for editing your HTML code (in Template-->Edit html), it is just more user friendly.

3. Yeah, if you edited the .js file, you have to upload it to any free uploader where it wont be deleted, try pages.google.com. Then get the link of that file after uploading and replace this line with it:
script src='http://mp3mohit1.googlepages.com/tabbed.js' type='text/javascript'

Hope that clarifies your doubts.

Handoko said...

Yup, I got it now.

But I have to place your code above my Read More code.

So, with this hack basicly the Read More code is no longer needed since they have the same function, except your code is more practical since the readers dont have to go another page.

Now, I learn something New. Its a Great Hack. Thanks a lot, I'm surely will try this for my next post.

Best Regards,
Handoko

Handoko said...

Basketer,

Another question, please.. :)

1. How to create Topics Tab like you have above ( Home, Cricket, Blogger's Resources, Window, Post Map, About, Contact Me )

2. I want to Open my BlogRoll Links in a new window, so my blog will keep open. How to do that?


Thanks again,
handoko

Basketer said...

Hi, I am glad that this hack worked out fine for you

about the labels, mine is the part of the template i am using. For finding a hck to get your blogger labels as vertical or horizontal tabs follow these links:

http://hoctro.blogspot.com/2006/09/tweaking-new-blogger-turning-labels.html

I dont know the answer to your other question, please tell me if you can find that out.

Anonymous said...

Hello,
Sorry the link does not work- http://hoctro.blogspot.com/2006/09/tweaking-new-blogg

Basketer said...

IT is working fine. You have used an icomplete link. Please copy the complete link, I have checked it, it does work.

Handoko said...

Hi Basketer, I'm back :)

About my question of opening blogroll link in a new window. well, I was trying to place some tags to it's HTML , but It wont work, but I was quite sure that it's impossible blogrolling.com doesnt give this kind of feature.

So, I recheck the feature and Gotcha, I found it. I missed something there.

Try this. Go back to your account in Blogrolling.com -->HOME-->Edit/Delete Links. U have to Edit each link. In Basic Option Box, u will find "Target" Option. Fill it with: New.

Save Link, go back to HOME and Get The Code. place it in your blog again, Republish. Its' done.

Now we can keep our blog Open. hehe.. :)

Anonymous said...

Hi
Your post on adding tabs was very useful, i tried ti add tabs to the post and it works well as long as i just show one single post on the page. But, if i want to show lets say 3 posts on one page and every post has three tabs how do I it? I tried to have three posts on the page but the thing it automatically creates 9 tabs next to each other. But, I specifically want to show three differener posts on page page and three tabs per post. Please help!!!!
Thank You
Dee

Unknown said...

hey,
I am computer challenged. everytime I try to do it I just errors. I want to put tabs on my blog so I can have each subject be a different tab. like for every adventure I want a different tab. Can you help me out? my blog is gbkayak.blogspot.com my email is also on my profile

Anonymous said...

you'll be surprised at the plentiful varieties such as Kingdom Hearts Cosplay, Bleach Cosplay, Final Fantasy Cosplayand you are sure to find the special anime cosplay costumes you've been looking for wholesale costume in our store.

Anonymous said...

酒店經紀酒店打工 酒店工作酒店上班 酒店兼差 酒店兼職 打工兼差 打工兼職台北酒店 酒店應徵 禮服酒店 酒店經紀 打工兼差

Kamot mo! said...

good day i tried this hack but it is not working on my test blog. www.kamotmo.blogspot.com

i follow all the instructions written on your post but still nothing happens. please help.. i want to put different videos in each every post. this hack can help to minimize the post. please email at Xynoplics098@yahoo.ca . Thanks

Unknown said...
This comment has been removed by the author.
Unknown said...

If you love mineral water vytrqpn athletics, you also will check out getting some Oakley Frogskins. These kind of musician Oakley Frogskin are generally exclusively devised for significant mineral water circumstances. Your anatomist regarding your design and style through the Cheap Oakley Sunglasses is around enabling you to discover superior with all the branded Say 300 along with 500 Oakley Jawbone. This doesn't happen ought to price tag anyone the supply including a knee to get Oakley Jawbones. whilst you keep in an authorized online vendor, you can find the most affordable selling price Oakley sunglasses.

Unknown said...

Sometimes too hot the eye of heaven shines,And hidh81ke often is his gold complexion dimmed;
And every fair from fair sometimes declines,By chance, or nature’s changing course, untrimm’d.
Cheap New Era Hats
New Era 59fifty Hats
New Era 59fifty caps
New Era Hats Wholesale
Cheap Hats