Implemented: New title parameter for TOC variable
Documentation in
TWikiVariables, changed content indicated in
red:
%TOC{"SomeTopic" ...}% |
Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax ("---++ text" ) and HTML ("<h2>text</h2>" ) are taken into account. Any heading text after "!!" is excluded from the TOC; for example, write "---+!! text" if you do not want to list a header in the TOC. Supported parameters:
Parameter: |
Description: |
Default: |
"TopicName" |
topic name |
Current topic |
web="Name" |
Name of web |
Current web |
depth="2" |
Limit depth of headings shown in TOC |
6 |
title="Some title" |
Title to appear at top of TOC |
none |
Examples: %TOC{depth="2"}% , %TOC{"TWikiDocumentation" web="TWiki06x01" title="Contents:" }%
|
Test style if you want to test the TOC:
<style>
.TWikiToc { font-size: 95%; line-height: 1.3em; margin: 2em 0 2.5em 0; padding: 0; }
.TWikiToc li { margin-left: 1em; }
.TWikiToc a:link, #twikitoc a:visited { text-decoration: none; }
.TWikiToc a:hover { text-decoration: underline; }
.TWikiToc ul { list-style: outside; margin: 0; padding: 0 0 0 0.5em; }
.TWikiToc .title { margin: 0; padding: 0; font-weight: bold; color:orange; }
</style>
Patch:
patch_TOC_heading4.diff (revised, in CVS)
Contributors:
--
ArthurClemens - 05 Jan 2004
--
PeterThoeny - 08 Jan 2004
test headers:
Test heading h1
Test heading h2 This text is ignored for the TOC.
Test heading h3
Test heading h2
Removed brainstorming and comments; see topic history.
Changed id=twikitoc to class=TWikiToc to maintain uniform
CSS tagging.
--
ArthurClemens - 10 Apr 2004