Sunday, April 27, 2008

A simple way to create a table of contents in Blogger.com

This is highly off the music topic, but it might be useful for someone.
I wanted my music blog to show one article on the main page, and then an table of contents of ALL the posts on the blog so visitors could click on them to read more.

This was AMAZINGLY difficult to do: Blogger.com by default shows 'recent posts', but these are subgrouped by month - and you have to click into the month to see the actual posts. Slow and boring, and while you can turn the month summaries off, there's another problem - Blogger doesn't show ALL the posts, just the last 10 or so.

There are a number of fancy hacks out there (like this one) that show you how to create a zoomable / flies-in, flies-out Table of Contents, but I just wanted a simple, always there list of all my posts.

Solution: Feedburner's Buzz Boost service. Feedburner is owned by Blogger (which is owned by Google), but it functions as a separate service. [ Seriously, why the division? ] Sign up, and enter your blog address as a 'feed'. Then, click on the Publicize tab. Then click on Buzz Boost - this handy feature gives you a scrap of HTML so you can republish your blog anywhere you can paste in the BuzzBoost code. If you configure the BuzzBoost to display ALL the posts, with NO content (just the title) as shown in my example, you end up with... a table of contents!

Take the HTML from FeedBurner and post it back into your Blogger.com template, for example over on the sidebar if you're using the new fancy Layouts mode. Note (n00bs) that you don't just paste the code - you go to "layout", create an HTML widget, then paste the code in there.

In my example, I created an HTML widget called "Older Posts" into which I inserted the BuzzBoost code.

What you'll see is (awesomely!) that you now have an always updated TOC for your site - no need to screw around with fancy template hacks. It works! Problem solved, enjoy. Why Google/Blogger/Feedburner don't make it easier to create a TOC, I don't know.