Demo of TOC
1.Make a new Blank Post in Blogger With Title "Table Of Contents" (or whatever you like)
2.Before publishing this post,make sure that you set the publishing date to an old one so that this post wont appear in your blog feed..You can Do it From Post Options in the Post Editor.. Also Don't allow comments on this post
3.Now we have created a new post page where the Table Of Contents will be displayed
4.Note down the URL of this post that we created
5.Find
</head>
in your template and replace it with the following code after applying the proper url
<b:if cond='data:blog.url == "http://www.bloggerplugins.org/2005/06/table-of-contents.html"'>
<style>
#toc {
border: 0px solid #000000;
background: #ffffff;
padding: 5px;
width:100%;
margin-top:10px;
}
.toc-header-col1, .toc-header-col2, .toc-header-col3 {
background: #ddd;
color: #000000;
padding-left: 5px;
width:50%px;
}
.toc-header-col2 {
width:15%;
}
.toc-header-col3 {
width:25%px;
}
.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:93%;
text-decoration:none;
}
.toc-header-col1 a:hover, .toc-header-col2 a:hover, .toc-header-col3 a:hover {
font-size:93%;
text-decoration:underline;
}
.toc-entry-col1, .toc-entry-col2, .toc-entry-col3 {
padding-left: 5px;
font-size:93%;
}
.post{display:none;}
.comments-block{display:none;}
.comment-form{display:none;}
.comment-footer{display:none;}
.blog-pager{display:none;}
.date-header{display:none;}
.feed-links{display:none;}
.comments{display:none;}
</style>
</b:if>
</head>
<style>
#toc {
border: 0px solid #000000;
background: #ffffff;
padding: 5px;
width:100%;
margin-top:10px;
}
.toc-header-col1, .toc-header-col2, .toc-header-col3 {
background: #ddd;
color: #000000;
padding-left: 5px;
width:50%px;
}
.toc-header-col2 {
width:15%;
}
.toc-header-col3 {
width:25%px;
}
.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:93%;
text-decoration:none;
}
.toc-header-col1 a:hover, .toc-header-col2 a:hover, .toc-header-col3 a:hover {
font-size:93%;
text-decoration:underline;
}
.toc-entry-col1, .toc-entry-col2, .toc-entry-col3 {
padding-left: 5px;
font-size:93%;
}
.post{display:none;}
.comments-block{display:none;}
.comment-form{display:none;}
.comment-footer{display:none;}
.blog-pager{display:none;}
.date-header{display:none;}
.feed-links{display:none;}
.comments{display:none;}
</style>
</b:if>
</head>
6.Now again edit your template.. Don't Expand the Widget Templates..
7.Find this line of code
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
and immediately after that place this code snippet..(after editing the snippet with your toc url)
<b:widget id='HTML345' locked='false' title='Table Of Contents' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == "http://www.bloggerplugins.org/2005/06/table-of-contents.html"'>
<h2 class='title'>Blog Table Of Contents</h2>
<div class='widget-content'>
<div id='toc'><img src='http://i38.tinypic.com/34ov7n4.gif'/>Loading The Blog TOC...</div>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
<b:includable id='main'>
<b:if cond='data:blog.url == "http://www.bloggerplugins.org/2005/06/table-of-contents.html"'>
<h2 class='title'>Blog Table Of Contents</h2>
<div class='widget-content'>
<div id='toc'><img src='http://i38.tinypic.com/34ov7n4.gif'/>Loading The Blog TOC...</div>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
8.Now Find
</body>
and place this code immediately above it after tweaking it with your blog urls..(there are 2 urls..replace all those green urls properly)
<b:if cond='data:blog.url == "http://www.bloggerplugins.org/2005/06/table-of-contents.html"'> <script style="text/javascript" src="http://blogger-plugins.googlecode.com/files/blogtoc.js"></script> <script src="http://www.bloggerplugins.org/feeds/posts/default?alt=json-in-script&max-results=500&callback=loadtoc"></script> <script src="http://www.bloggerplugins.org/feeds/posts/default?alt=json-in-script&start-index=501&max-results=500&callback=loadtoc"></script> <script src="http://www.bloggerplugins.org/feeds/posts/default?alt=json-in-script&start-index=1001&max-results=500&callback=loadtoc"></script> <script type="text/javascript">showToc();</script> </b:if>
Now try visiting your TOC Page.. Got it working?? If you failed.. don't worry.. i can help you out..Contact me @ Blogger Forum or via comments
Credits:Special Thanks to Hans of Beautiful Beta for the javascript that powers the TOC
If you got it working show us the url.. We will help you in any further tweaking and let you know if any changes are needed...
Note:If you are reading this in a feed reader, the iframes wont be properly displayed so visit the actual post @ Table Of Contents For Blogger



Question :1
I don't understand what is a table of content....first please give me the screen shot of a toc...then i will try this.....
Question:2
If i link urs footer logo...will u link mine blog in ur blogroll....
see the demo..
and if you need a listing here,you can add your blog to our blogger directory
its hard away,,better preview with the video
TSF
@Fa.Topeng i am not good at making videos.. do u know of any s/w that helps in doing it easily..
I dont see it working on my blog, can you please check, link is in my name
@Moviesatrapid.com you did the first part correctly.. but made a little error on the second one..i had asked to put the last code above </body>
you placed it below it.Change this and you will get the TOC working..
your blog has many posts.. so you will have to add some more lines of code..This by default will show only the first 500 posts..
In this code there are three script lines right?
The second one script line specifies your blogger feed.. Inorder to display the next 500 posts.. you have to put that loine once again, with an additional parameter start-index=501
I have modded the new code in the post .. so take another look..
what do you think is wrong with mine?It does't appear aneesh!help. .
@show me the TOC post page.. I couldn't find it from your big list.. ;)
hi I tried this, but I'm getting this error message "The template could not be parsed as it not well formed..... The reference to entity "http:" must end with the ";" delimeter.
I'm really no into XML.
and in instruction Number 8 you mentioned 2 url. I found the first one, which is the other one?
Thanks, and more power. I love u.
opps I forgot my TOC post page, here it is:
http://yodi967.blogspot.com/2004/05/table-of-contents.html
the actual error message is
"Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The reference to entity "http:" must end with the ';' delimiter.
i think you did the first part correctly..
and you shouldnt be getting an error on step 2..
did you get the error when you tried to place it above </body> ???
hello, sorry for bugging you, but I finally solve the problem with the delimeter error. I saved my template but It's not appearing.
here's my TOC link
http://yodi967.blogspot.com/2004/05/table-of-contents.html
Thank you so much for sharing this. Hope you can help me out. i love you. more power!
ok.. i think you have some problem in the bif condition.. because the the code within
<!--START OF TOC CODE 3-->
<!--END OF TOC CODE 3-->
doesnt appera in the toc page.. had you replaced my toc url??
mine seems to just keep loading
http://playstationbloggeruk.blogspot.com/2009/07/list-of-posts.html
@krease you changed the script url with the url of your blog..
http://bloggerplugins.org/me/blogtoc.js shouldn't be changed..Its the script that works behinf the TOC.. The loading thing will automatically disappear when this script is executed..
thanks very much for your help
any ideas of how i can add a button next to my home button saying list of blogs?
that button is an image.. SO you will have to design a similar button using photoshop or gimp..
<a ------><img src="http://img268.imageshack.us/img268/586/hm2.gif"/></a>
Some code similar to this is there in your template.. Add another piece of this code after modifying it with the url and the url of the image..
ok thanks
i just noticed in my list every post appears twice is there something i need to change?
sorry that was my mistake.. there is some spelling mistake in the code.. ;)
change iindex to index.. :)
great thanks very much for all your help
your amazing :)
I already placed the code in your instruction Number 8. I changed the URL
http://www.bloggerplugins.org/2005/06/table-of-contents.html
into my URL:
http://yodi967.blogspot.com/2004/05/table-of-contents.html
The instruction said there's 2 URLs, I don't know which is the other one.
It is appearing on my EDIT TEMPLATE HTML page when I checked inside blogger, but it's not showing up when I checked view page VIEW -> PAGE SOURCE
The page just keeps on loading blog TOC.
Thanks a lot. More power to you!
You're great.
the other url is http://www.bloggerplugins.org/feeds/posts/********
there is 3 occurances of this url..
Whooah!, I finally got it working.. a million thanks! I will definitely put your link in my blogs.
http://yodi967.blogspot.com/2004/05/table-of-contents.html
hmmm, but one more thing please,please please... I need tweaking in the LABELS column. it's a bit too wide.
[I guess I badly need enrolling a short course on HTML.]
Thanks. I LOVE YOU!
use this as the last line in the top css that you added ie just below the </style>
to set width of the third colum.. add this line it is in %
.toc-entry-col3,.toc-header-col3{width:10%;}
to hide the 3rd column add this line
.toc-entry-col3,.toc-header-col3{display:none;}
above</style>
ok ;)
Got it all nice and neat.
Thanks.
Mabuhay! (that's "Long Live!")
from the Republic of the Philippines.
if you want you can change the background color using CSS
just add
background-color:#ffffff; to the #toc definition
where #ffffff is the desired background color in hex..
thank you for showing a screenshot and a working demo..i will try to implement it..
http://www.visadocumentation.com/2009/06/contents.html
it doesnt work for me please help aneesh
summybabu@gmail.com
thank for information....
you are awesome
I tried and followed all the steps but i am not able to paste the last link in the final code. Where do you i paste 2 urls as you have instructed us to do in the code.
I could figure out the first but not the second one. Your help is appreciated
you have to change http://www.bloggerplugins.org/2005/06/table-of-contents.html to your toc page's url
and you have to change http://www.bloggerplugins.org/feeds/posts/default with
http://yourblog.blogspot.com/feeds/posts/default (there are three of them in the code..)
i hope it is clear now..
hey man what happened no trick of urs is working on my blog
the above also is not working
plz check the url
http://vaseemansari.blogspot.com/2009/08/table-of-contents-of-vaseemansaris-blog.html
@The King Khan as i said for the other one,
follow the tutorial completely..
i cant be sure but i think you diddn't replace
http://www.bloggerplugins.org/2005/06/table-of-contents.html
with
http://vaseemansari.blogspot.com/2009/08/table-of-contents-of-vaseemansaris-blog.html
you might also have missed out on some more.. fix this first.. and i will try to tell you where else you have gone wrong..
Aneesh, nice:) I set it up here: http://www.poker006.com/2009/02/table-of-contents.html
Do you know how I can remove related posts, add in between posts from the table of contents post? And is it possible to split it up into more then 1 page because I have 330 posts and it takes long to load. And someone with 1000 posts will take forever...Anyway, you rock:)
first of all its not my hack.. it was made by Hans of Beautiful Beta.. He is no longer blogging.. almost left over..
Yea it is possible to hide the Recent posts thing..you just need to add some more css
try adding .related_posts{display:none;} near the other display nones
to hide the div with id related_posts
and yea its possible to split it up into pages..
say 100 on the first,next 100 on the second..etc.
you will have to make some more toc pages like toc1,toc2 etc.. and do the same for all the pages..
those three lines which contain the feed url decides which ones are to be displayed on each page(something like (http://www.bloggerplugins.org/feeds/posts/)
if you are splitting it up, just use a single instance of that and use start-index and max-results attributes to tweak it around..
i hope you can figure that out..
the max-results that can be fetched at a time is 500, thats y i included 3 instances of that so that it can handle upto 1500 posts..
Very nice tutorial.. thanks, one question how did you put your ads in the center of the post.. i can only add before and after post.. thanks in advance
Thanks i need that table of content widget its nice working
cheers
HI Anesh sorry ,my inglish isnt good, but i will try.. i have done all the steps on the tutorial,but my toc just keep loanding, dosent answer the toc, please help ,,im follow all the coments and i couldint not see why it wont work,many thanks heres the url,,http://amigodcristo.blogspot.com/2009/04/todo-conteudo.html ,,i want to say that is great widget i realy want to have this one..please !!!
i think you are modifying it now.. everything is going good!!
but it is http://amigodcristo.blogspot.com/feeds/posts/
and not
http://amigodcristo.blogspot.com/posts/
Aneesh ,,yuopp you are just amazim,,i cant describ you..just superr star,,hehehe many thanks,
,,and congratulation for you job thats you are doing here ,,well recomend cherrs
A table of contents is handy to have when searching for older posts to link to or refer to friends... I have a variation of this tutorial, also based on Hans' work. I like that my TOC is able to sort by clicking the header column. thanks for your version --- variety is the spice of life!
Thanks, I will try it in my blog tomorrow.
aR
Bangla Hacks
You can try my script to make Table of contents, Auto catogorize by label in here The Best Table of Contents (TOC) or Sitemap for Blogger
At last I have successfully add it in my blog. Thank you Aneesh. But why don't you write a another tutorial about split it up into more then 1 page.
Excellent. I've also done it. It is strange because I am always terrified for changing or editing the HTML codes.
Thanks.
Great hack, awesome stuff! Thank you :-))
Aneesh, I implement this in my xxxx.blogspot.com blog successfully. But now I failed to active it in my own domain. Don't know what's the problem. Would you please check my blog?
www.banglahacks.com (Sorry if you think it spamming)
I have done. Don't need to publish my previous comment.
Thanks
Very Great!! I have implement this Blogger Mod.
Much thanks to this blog webmaster!
For others who look for implementation demo, feel free to visit my blog.
Thank You.
I've more than 5 blogs(with subdomains). I want to have a all the posts in various blogs to appear in my main blog. Is there any way we can stream the posts or feeds to my main blog
Its really cOOl i found it working for the very first attempt.
I am searching for a new Hack.How can we show latest posts from a particular Label like recent post widget but only from one label.I hope i m not the only one searching a thing like this:)
thanks
bye...
@Inner Voice,
its already there.. you can get that by slightly editing the codes for any of my recent posts widget on this blog. You will have to edit the widget content with the blog's label feed url instead of the blogs feed url..
not working...showing a alert box -"Just wait... TOC is loading"
check once :http://123tina.blogspot.com/2005/10/table-of-contents.html
@Mr.Awesome ,
i see that its working perfectly now.. hope you fixed it :)
It takes hours for it to load, what have ii done wrong? http://unitybond.blogspot.com/2001/01/contents.html
@Unity Bond ,
you didn't do step 8 properly..
Thanks a billion! It worked! Except that its annoying cause got Disqus comment form below which i have no idea how to exclude it from that post. But yeah! I'm glad i found this blog! Thanks again!
I was able to implement it here joana-morais.blogspot.com/2006/09/table-of-contents.html, however I'm having a silly [newbie] problem, how do I change title class? If I replace h2 with h1 the tile will become huge, can we style the title at the css part? If so can you please teach me what to add? thank you.
its fail for me,..see http://helpacademy.blogspot.com/2009/08/site-map.html
There is problem. http://www.gitarevi.net/2009/08/arsiv.html
this is the url of mine
http://piczzmania.blogspot.com/2008_12_01_archive.html
i did try to do this. but the problem is contents are showing below the post. plz have a look and suggest what can i do thanks.
Hi aneesh............
Not working for me........
www.123friendz.blogspot.com.This is my blog.......
So i removed ur code..........
http://blog.imobiliario.com.pt/2009/10/resumo.html
Aneesh
Hi. My page just shows "Loading the Blog TOC"
Can You help me? Thanks
--------------------------------------
Note: On Step 3 I didn't find the line of code:
So I place de code after the line
--------------------------------------
May be is wrong here, no?
Thanks in advance for your help.
GReat work You are doing here.
Regards,
Hello,
I successfully placed above codes but found the widget placed below the posts area, kindly help........
i just got this hack into my blog and cannot thank you enough. It worked like a charm (as long as I followed your directions to the letter). I will continue to turn to you for the bets tips and tricks this side of Google. Thank you again.
Glenn
Bigezbear
Hi, Could you please help. I have installed it, but I can't sort it by title, date or label. Could you please help. Thanks
My url: http://www.mhd-hdhieu.com/2009/02/table-of-contents.html
Hi!
This works great for me. Thank you very much!
Still, I'd like to do some modification: I'd like to rename/translate some things, since I don't use english on my blog.
Namely, I'd like to translate the following: "Blog Table Of Contents", "Displaying all 8 posts", "POST TITLE", "POST DATE", "LABELS". Any idea, how to do that?
Also, is it possible to modify the date format and font size?
Thanks again!
(My blog's TOC: http://moj-zdravi-svet.blogspot.com/2009/02/kazalo.html)
Hi,
I followed all the right steps, at least I think I did, and nothing seems to be showing up in my TOC Post. I was originally going to do this as a post and then switch it to my archive link at the top.
here are the links: thejuicebyasi.blogspot.com
and TOC: http://thejuicebyasi.blogspot.com/2010/03/contents.html
@ASI - you haven't followed the steps properly. you have to change http://www.bloggerplugins.org/2005/06/table-of-contents.html to http://thejuicebyasi.blogspot.com/2010/03/contents.html in the codes.
Similarly you have to change http://www.bloggerplugins.org/feeds/posts/default with http://thejuicebyasi.blogspot.com/feeds/posts/default
If you had followed the steps, those codes should have been visible in your page's source. But it is not.
Tanks my friends
Hi,
To install this widget using the new blogger **static pages**, is there anything different from the tutorial above?
Thanks a lot.
I repeat the Anonymous's question above.
Thanks It is working
http://arabiconlinecourse.blogspot.com/2010/02/arabic-online-course-table-of-content.html
thanks for sharing
This works great on my blog, thank you!
I get the custom domain for my blog. Before my custom domain MY TOC working proper. But Now It can not working.I also change the TOC code .blogspot .com to .net PLZ help me
http://www.arabiconlinecourse.net/2010/02/arabic-online-course-table-of-content.html
Hi! I managed to get this thing to work. Only question is how to translate the word "Pages"? I changed the words for "Next" and "Previous", but couldn´t find that "Pages"-word anywhere.
Thanks in advance!
BR,
Harri
http://kotilahelaan.blogspot.com/
Mine is not working either. My TOC page is http://cash-crate-surveys.blogspot.com/2010/06/archives.html
Why is it just blank?
Very nice tutorial,I've been looking for something like this. Here's my TOC page http://movie216.blogspot.com/2010/05/movie-archive.html. I changed it to Movie Archive...
Tnx,
Movie216
http://movie216.blogspot.com
great post, works good,
but i have a guestion,
can we edit or add something to sort by name (titles) "A to Z" i mean?
dude, there ain't result
may be u need to make it clearer
tx
Can this be put in a static page? What changes would I make?
is it possible to change the text color? I got it all working, just the Title for the app is almost white with no contrast to the page.
here's my toc http://www.randombrainwork.net/2010/02/table-of-contents.html
I have same question as above, can we put it on a static page?
@Nancy,Monica - yea you can put it on a static page. You need to replace the post url with the static page url.
mine is not working.. i put the TOC link on the top of the page.... when i click on it.. nothing appear....
my toc http://muchikito.blogspot.com/p/table-of-content.html
Hi. I would like to know if there is a way to prevent some entries to appear in the TOC, hiding some specific label ???
Thanks for your help
Need a portable script to place it in a seperate page/post listing more than 3000 posts in my blogspot
Any chance you could help me please
all the best
http://netbit.ubucentrum.net/p/spis-tresci2.html
why TOC is not inside post ?
thanks..it works...
but what should i do to view that in another page....?
Post a Comment
Please don't spam on here..