From: Jack M. <ja...@co...> - 2008-10-17 07:03:13
|
Hi all. I just wanted to point out that I wrote a TOC extension that's nicer than the one linked to the wiki and (more importantly) is 2.0+ compatible. Some differences from the aforementioned extension: 1. The anchor names aren't mangled... they are anchors generated by slugifying the header contents (ala Django), which leads to much more readable/memorizable links. 2. Header text is replaced by a self link of type toclink. 3. All instances of the marked (by default [TOC]) are replaced by the TOC div, not just the first one. It also replaces the entire containing tag too. It's designed for having Textextextextextextextextextext [TOC] Moretextextextextextextex So, to avoid messing up validation, it replaces the <p> tags created by having the breaks. Anyway, the code is available: http://codezen.org/static/toc.py And it's in use on my project pages, if you want to see an example: http://codezen.org/canto/config/ I'd like to get this included with the main source, if possible. Otherwise, I'll just add a link to the wiki when 2.0 is officially released. --Jack |