Table Of Contents Widget For Blogger

You might have noticed the new Table Of Contents Section On this Blog.. It uses the Selective Widget Display.. This widget requires Javascript ans hence it will take time to load.. So we will be modding it so that it will be displayed on a particular Page only..

Here is the Step by Step Tutorial


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>

 


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://bloggerplugins.org/me/ajax-loading.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://bloggerplugins.org/me/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.get-b/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>

Source: http://bloggerplugins.org/

COMMENTS

BLOGGER: 2
Loading...
Name

Accounts Add new Adsense Analytics Auto Backlinks Banned Blogger Templates Comments Contact Me Cool Tricks Costumize Domain Downloads Embed Ensure Google account won't be disabled Feeds Gallary Google Hacking Hacks Hosting How to Improve Install Templates Internet tips Introduction Ip address Ip adress Javascripts Joomla Latest Links Menu Password hacks posts Remove Replace Search Secrets Security SEO Sitemaps Softwares Solve TOC Tools Track Traffic rank Tricks Tutorials Twitter Useful Widgets Videos Website hack Windows Hacks and Tricks Windows Hacks and Tricks. Wordpress
false
ltr
item
BlogSpotter: Table Of Contents Widget For Blogger
Table Of Contents Widget For Blogger
BlogSpotter
http://get-bloggertricks.blogspot.com/2009/09/table-of-contents-widget-for-blogger.html
http://get-bloggertricks.blogspot.com/
http://get-bloggertricks.blogspot.com/
http://get-bloggertricks.blogspot.com/2009/09/table-of-contents-widget-for-blogger.html
true
8597927827268575619
UTF-8
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy