]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FCreateTocPlugin
Updated documentation, added examples, use table for arguments
[SourceForge/phpwiki.git] / pgsrc / Help%2FCreateTocPlugin
1 Date: Sat, 20 Aug 2008 15:51:24 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124)
3 X-Rcs-Id: $Id: Help%2FCreateTocPlugin,v 1.7 2008-08-20 17:56:13 vargenau Exp $
4 Content-Type: application/x-phpwiki;
5   pagename=Help%2FCreateTocPlugin;
6   flags=PAGE_LOCKED;
7   markup=2;
8   charset=iso-8859-1
9 Content-Transfer-Encoding: binary
10
11 The *~CreateToc* [plugin|Help:WikiPlugin] allows to create a dynamical *Table of Contents* of all headers. It also allows to number the headers in the page.
12
13 The headers might be in classic Phpwiki syntax or in Wikicreole/Mediawiki syntax (see below).
14
15 The Table of Contents can easily be inserted by clicking on the TOC button in the Edit toolbar.
16
17 !!! Usage
18 <verbatim>
19 <?plugin CreateToc arguments ?>
20 </verbatim>
21
22 !!! Arguments
23
24 {| class="bordered"
25 |-
26 | Argument
27 | Description
28 | Default value
29 |-
30 | <b>firstlevelstyle</b>
31 | Style of first level numbering: number, letter or roman.
32 | number
33 |-
34 | <b>headers</b>
35 | Which headers to include. See below.
36 | 1,2,3,4,5
37 |-
38 | <b>indentstr</b>
39 | Indent string.
40 | &nbsp;&nbsp;
41 |-
42 | <b>jshide</b>
43 | Boolean if the Table of Contents should be initially hidden and on click expanded.
44 | false
45 |-
46 | <b>liststyle</b>
47 | List style: dl or ol or ul. Using ol is equivalent to with_counter=1.
48 | dl
49 |-
50 | <b>noheader</b>
51 | Boolean if the Table of Contents header should be omitted.
52 | false
53 |-
54 | <b>notoc</b>
55 | Boolean if the Table of Contents should no be displayed (headers are numbered).
56 | false
57 |-
58 | <b>pagename</b>
59 | Table of Contents of which page?
60 | current pagename
61 |-
62 | <b>with_toclink</b>
63 | Boolean if headers should link back to the Table of Contents.
64 | false
65 |-
66 | <b>with_counter</b>
67 | Boolean if hierarchical prefixes should be added.
68 | false
69 |}
70
71 !! Headers
72
73 Syntax: a comma-separated list of levels. !!!,!!,! also allowed
74
75 {| class="bordered"
76 |-
77 | Level
78 | Phpwiki syntax
79 | Wikicreole/Mediawiki syntax
80 | HTML rendering
81 |-
82 | 1 || ~!~!~! || ~=~= || h2
83 |-
84 | 2 || ~!~! || ~=~=~= || h3
85 |-
86 | 3 || ~! || ~=~=~=~= || h4
87 |-
88 | 4 || ''None'' || ~=~=~=~=~= || h5
89 |-
90 | 5 || ''None'' || ~=~=~=~=~=~= || h6
91 |}
92
93 !!! Examples
94
95 !! Default values
96 <verbatim>
97 <?plugin CreateToc ?>
98 </verbatim>
99
100 !! Table of Contents with hierarchical numbering
101 <verbatim>
102 <?plugin CreateToc with_counter=1 ?>
103 </verbatim>
104
105 !! No Table of Contents, but headers are numbered
106 <verbatim>
107 <?plugin CreateToc notoc=1 ?>
108 </verbatim>
109
110 !! Table of Contents with hierarchical numbering, first level in roman
111 <verbatim>
112 <?plugin CreateToc with_counter=1 firstlevelstyle=roman ?>
113 </verbatim>
114
115 See also [PhpWikiDemo:en/TextFormattingRules]
116
117 !!! Known Problems
118
119 * If you include pages via [Template|Help:TemplatePlugin] or [IncludePage|Help:IncludePagePlugin] plugins, the Table of Contents will not contain the headers of the included pages.
120 * The Table of Contents will be incorrect if a header contains:
121 ** a [Template|Help:TemplatePlugin] plugin call via ~{~{ ~}~},
122 ** an image,
123 ** or a ~~.
124 * If you preview the page, the Table of Contents will not be correct if you modified headers. The Table of Contents will be taken from the last saved revision.
125 * If you display an old revision of a page, the Table of Contents will not be correct. The Table of Contents will be taken from the last saved revision.
126
127 ----
128 [PhpWikiDocumentation] [CategoryWikiPlugin]
129