Wednesday, April 11, 2007

BlogToC Widget Released

The job is done. We now have a complete interactive Table Of Contents. Click the button in my sidebar to display the TOC. You can sort the TOC by Post Title by clicking the column header. Click it again, and it is sorted in reversed order. The same way if you want to sort the posts by date: newest first, or oldest first. And by clicking on one of the labels in the TOC filters all posts with that label. Click the column header to return to the full ToC.

Here is how to install it to your Blog.

Step 1: Back Up your Template.

Step 2: Add a HTML Page Element
Edit your template in HTML-mode, and look for the <b:section> with id=main. This is the section that holds the Blog posts.
Change that line as follows:

<b:section class='main' id='main' maxwidgets='2' showaddelement='yes'>

Save the template and switch to the Page Elements Tab.
Add a HTML page element above your Blog Posts element.
Leave the title blank. Add the following html:

<div id="toc"></div>

Save your template.

Step 3: Add a Sidebar HTML-element
Now add a HTML-element to the sidebar. Set the title to "TOC".
For the contents, enter:

<div id="toclink"><a href="javascript:showToc();">Show TOC</a><br/><br/></div>
<script style="text/javascript" src="http://kpn.planet.nl/oosti468/downloads/blogtoc.js"></script>
<script src="http://YOURBLOG.blogspot.com/feeds/posts/default?alt=json-in-script&max-results=999&callback=loadtoc"></script>

Replace YOURBLOG with the name of ...... exactly.
Oh yes, and save.

Step 4: Add custom styles to the skin of your template.
New id's and classes are:
#toc : the div-wrapper that contains the TOC
.toc-header-col1 : header of column 1
.toc-header-col2 : header of column 2
.toc-header-col3 : header of column 3
.toc-entry-col1 : cell in column 1
.toc-entry-col2 : cell in column 2
.toc-entry-col3 : cell in column 3

For your convenience: Beautiful Beta uses the following styling:

<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>

You can add this to the <b:skin>-part of the template, or insert it in the sidebar widget.

Enjoy!

30 comments:

  1. The job is done. We now have a complete interactive Table Of Contents. Click the button in my sidebar to display the TOC. You can sort the TOC by Post Title by clicking the column header. Click it again, and it is sorted in reversed order. The same way if you want to sort the posts by date: newest first, or oldest first. And by clicking on one of the labels in the TOC filters all posts with that label. Click the column header to return to the full ToC. gul ahmed lawn , lawn suits online shopping , lawn dresses online , pakistani designer lawn suits , pakistani cotton suits online , lawn collection , lawn suit design , new lawn collection , unstitched suits pakistani , lawn suits with prices

    ReplyDelete
  2. I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article...
    pakistani lawn brands

    ReplyDelete

  3. I really impressed after read this because of some quality work and informative thoughts . I just wanna say thanks for the writer and wish you all the best for coming!.
    lawn suits

    ReplyDelete
  4. Cool stuff you have got and you keep update all of us.

    pakistani wedding dresses

    ReplyDelete
  5. I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well.
    summer lawn collection

    ReplyDelete
  6. Please let me know if you’re looking for a article writer for your site. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back to mine. Please send me an email if interested. Thank you!

    summer collection

    ReplyDelete
  7. thanks for the writer and wish you all the best for coming!
    lawn collection

    ReplyDelete
  8. You have a real ability for writing unique content.I like how you think and the way you represent your views in this article.I agree with your way of thinking.Thank you for sharing.
    t shirts for men

    ReplyDelete
  9. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point Eye lenses in Pakistan 2020

    ReplyDelete
  10. What a fantabulous post this has been. Never observed this sort of helpful post.
    Help With Finance Homework

    ReplyDelete
  11. This post is probably where I got the most useful information for my research
    Assignment Writing Service

    ReplyDelete
  12. How to exchange Bitcoin to PayPal? Here at this platform, you can exchange Bitcoin and many other currencies through PayPal easily and instantly as well as you are free to exchange between the different crypto coins and can furthermore exchange your coins into real money transferred directly to your PayPal account.

    ReplyDelete
  13. Nice A Blog & Artical
    Please VISIT MY Website biggest shopping website 50% off sale Contact NUmber +923000023915
    Top Saling Product
    EtsayDaraz Click hare visit Website


    Cash on Delivery all over Pakistan Online etsaydaraz.com biggest shopping website visit My Website

    Hot Lin call girls In Pakistan

    ReplyDelete
  14. Best Online Shopping etsaydaraz.com you experience an easy & hassle free online shopping in Pakistan
    Please VISIT MY Website biggest shopping website 50% off sale Contact NUmber +923000023915
    Top Saling Product Original Breast Product
    EtsayDaraz Click hare visit Website
    Cash on Delivery all over Pakistan Online etsaydaraz.com biggest shopping website visit My Website
    Hot Lin call girls In Pakistan

    ReplyDelete
  15. List of50% Best Online Shopping
    Please VISIT MY Website biggest shopping Best website 50% off sale All Pakistan Contact NUmber +923000023915
    Top Saling Product Original Breast Product
    EtsayDaraz Click hare visit Website
    Cash on Delivery all over Pakistan Online etsaydaraz.com biggest shopping website visit My Website
    Hot Lin call girls online In Pakistan

    ReplyDelete
  16. If You are Interested in Song Lyrics. You Can Easily Check out our Official Lyrics Website - https://www.lyricsovera2z.com/ . here You Get Various Types of Lyrics with Different Languages. "Lyrics Over A2z - A Genuine and Massive Lyrics Platform in the World.

    ReplyDelete
  17. Find the best discounted men, women and kids shirts, pents, jeans, jackets and trouser and other accessories according to your fashion needs at BrandzHub. It is the most popular online shopping store located in Lahore, Pakistan. Do online clothes shopping in Pakistan ​with BrandzHub and get the maximum discount prices

    ReplyDelete


  18. Nice A Blog & Artical
    Please VISIT MY Website biggest shopping website 50% off sale Contact NUmber +923000023915
    Top Saling Product
    Mumbai Call Girls pakistan

    ReplyDelete
  19. I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more, also your info will be a great addition for the paper which was pre written for me by professional writing service - fresh essays

    ReplyDelete
  20. https://www.blogger.com/comment.g?blogID=1098432826622937226&postID=5685736539046869147&page=1&token=1619173840690&isPopup=true

    ReplyDelete
  21. His estimated net worth is around a whopping $7 billion, as of March 2021 according to our news reports.
    Daniel Loeb net Worth

    ReplyDelete
  22. My father was in office, during the daytime. He was just browsing the internet for summer sale for cat shoes in pakistan. He just found a pair in black color ,and he ordered it. After few days, I received a parcel, with birthday wishes and that shoes. I was amazed , I hugged my father. My family throwed a surprise party on my special day. Love you dad.

    ReplyDelete