data/TWiki/VarTOC2.txt,v
changeset 0 414e01d06fd5
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 head	1.2;
       
     2 access;
       
     3 symbols;
       
     4 locks; strict;
       
     5 comment	@# @;
       
     6 
       
     7 
       
     8 1.2
       
     9 date	2008.01.22.03.21.36;	author TWikiContributor;	state Exp;
       
    10 branches;
       
    11 next	1.1;
       
    12 
       
    13 1.1
       
    14 date	2006.06.25.16.26.29;	author TWikiContributor;	state Exp;
       
    15 branches;
       
    16 next	;
       
    17 
       
    18 
       
    19 desc
       
    20 @buildrelease
       
    21 @
       
    22 
       
    23 
       
    24 1.2
       
    25 log
       
    26 @buildrelease
       
    27 @
       
    28 text
       
    29 @%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.1" version="2"}%
       
    30 %META:TOPICPARENT{name="TWikiVariables"}%
       
    31 #VarTOC2
       
    32 ---+++ TOC{"Topic"} -- table of contents
       
    33    * 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
       
    34    * Syntax: =%<nop>TOC{"SomeTopic" ...}%=
       
    35    * Supported parameters:
       
    36     | *Parameter:* | *Description:* | *Default:* |
       
    37     | ="TopicName"= | topic name | Current topic |
       
    38     | =web="Name"= | Name of web | Current web |
       
    39     | =depth="2"= | Limit depth of headings shown in TOC | 6 |
       
    40     | =title="Some text"= | Title to appear at top of TOC | none |
       
    41    * Example: =%<nop>TOC{depth="2"}%=
       
    42    * Example: =%<nop>TOC{"TWikiDocumentation" web="%SYSTEMWEB%" title="Contents:"}%=
       
    43    * Example: see TWiki:Sandbox.TestTopicInclude
       
    44    * %T% Hint: TOC will generate links to the headings, so when a reader clicks on a heading it will jump straight where that heading is anchored in the text. If you have two headings with exactly the same text, then their anchors will also be identical and they won't be able to jump to them. To make the anchors unique, you can add an invisible HTML comment to the text of the heading. This will be hidden in normal view, but will force the anchors to be different. For example, <tt>---+ Heading &lt;!--5--&gt;</tt>.
       
    45    * Related: [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarTOC][TOC]]
       
    46 
       
    47 @
       
    48 
       
    49 
       
    50 1.1
       
    51 log
       
    52 @buildrelease
       
    53 @
       
    54 text
       
    55 @d1 1
       
    56 a1 1
       
    57 %META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.2" version="1"}%
       
    58 a3 1
       
    59 
       
    60 d14 1
       
    61 a14 1
       
    62    * Example: =%<nop>TOC{"TWikiDocumentation" web="%TWIKIWEB%" title="Contents:"}%=
       
    63 d17 1
       
    64 a17 1
       
    65    * Related: [[#VarTOC][TOC]]
       
    66 @