Create Table of Contents Page for your blog

by Deineshd on June 15, 2008

Previously we have talked about creating table of contents in sidebar . That hack requires two components.There is the code which calls the contents of your blog, and provides a link in the sidebar.This hack is also similar to first one. we have done some modification in that code.You need to combine two codes in the post page.For demo you can see ours table of contents page.

Hack starts

First create a new blog post and paste the following code in Edit Html section.


You can see the whole post published in this blog here.To see full table of content click the link below(It make take few moments)<div id="toclink"><a href="javascript:showToc();"><b>Show Table of Content</b></a></div><script style="" src="http://home.planet.nl/%7Ehansoosting/downloads/blogtoc.js"></script><script src="http://YOURBLOG.blogspot.com/feeds/posts/default?alt=json-in-script&amp;max-results=999&amp;callback=loadtoc"></script><div id="toc"></div>

Remember to replace YOURBLOG with your blog name and Paste the above code in order that it looks like this.

toc Create Table of Contents Page for your blog

Now the second step is the Optional step . If you like to give style to your table of Content then copy the following code and paste it to the head section of your blog code otherwise leave it.


<style type="text/css">#toc {border: 0px solid #000000;background: #ffffff;padding: 5px;width:500px;margin-top:10px;}.toc-header-col1, .toc-header-col2, .toc-header-col3 {background: #ffd595;color: #000000;padding-left: 5px;width:250px;}.toc-header-col2 {width:75px;}.toc-header-col3 {width:125px;}.toc-header-col1 a:link, .toc-header-col1 a:visited, .toc-header-col2 a:link, .toc-header-col2 a:visited, .toc-header-col3 a:link, .toc-header-col3 a:visited {font-size:80%;text-decoration:none;}.toc-header-col1 a:hover, .toc-header-col2 a:hover, .toc-header-col3 a:hover {font-size:80%;text-decoration:underline;}.toc-entry-col1, .toc-entry-col2, .toc-entry-col3 {padding-left: 5px;font-size:70%;}</style>

More you can give link to your table of contents page in your blog. For that Goto layout Page and add a new HTML page Element .After that create a link text and use the link of the table of contents page which you have copied.

Technorati Tags: ,

Consider to Subscribe to our RSS feed or Follow us at Twitter or Join our Facebook Fan Page.Enter your Email below to subscribe to our updates via Email.

Enter your email address:

Delivered by FeedBurner

Similar Posts

Powered by Thesis

Thesis Theme

An amazing WordPress Theme, nothing beats the versatility and SEO friendliness of the Thesis framework.

From beginners, to the most advanced WordPress developers, Thesis makes it easy for anyone to customize it.

{ 8 comments… read them below or add one }

Balaji J H January 16, 2009 at 11:31 am

Yeap thanks for the grat hack mate

Reply

Balaji J H January 16, 2009 at 12:00 pm

I tried this today on my test blog and could not get the TOC to display. Then I look at BeautifulBeta and learned they have changed servers, so the java will not work. You must change the server id from “http://home.planet.nl/~hansoosting/…….” to “http://home.kpn.nl/oosti468/……” .

Works fine now — thanks.

Reply

Helmi Razali January 18, 2009 at 5:00 am

thanks a lot

Reply

ruthleen January 26, 2009 at 4:48 am

created a new blog,added table of contents but nothing shows,trendsofhandcraft.blogspot.com.
please will appreciate if u pop in

Reply

Prateek January 26, 2009 at 10:18 am

Javascript is no more available
Following link is Broken-

http://home.planet.nl/%7Ehansoosting/downloads/blogtoc.js

Reply

Acai Berry Diet November 25, 2009 at 8:43 pm

great post, thanks for sharing :)

Reply

water ionizer March 9, 2010 at 10:10 pm

Thats really great. Most bloggers dont have much to say or make things up. I am glad you have an honest truthful opinion.

Reply

Deineshd March 9, 2010 at 10:12 pm

Thankyou.

Reply

Leave a Comment

Previous post:

Next post: