::iimageright(“ylsy_toc.jpg”,”Table of Contents”)::
Scott at Fucoder.com has updated his Table of Contents Generator plugin for WordPress. The plugin scans through your post and builds a “Table of Contents” from the HTML headings (h1,h2,…) within the post. It also creates an anchor link for each heading so your readers can jump right to that section from the TOC.
You can place the TOC in your posts in one of two ways. You can place inside individual posts that you want to have the TOC or you can place some php code in the template and then the TOC will be placed in each post that uses that template.
We use WordPress for our office Content Management System and the posts in 2 categories should always have a TOC. I am going to set up special templates for those 2 categories using the php code so I do not have to manually add to each post in those categories.
I also use [Markdown plugin->] which does not play well with this plugin but another user already has figured out a hack by changing one line of the plugin from:
add_filter(‘the_posts’, array(new YLSY_TableOfContents, ‘the_posts’));
add_filter(‘the_content’, array(new YLSY_TableOfContents, ‘the_content’));
Finally, the TOC is all coded and ready for some css magic that you can modify to work as you see fit.