]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FCreateTocPlugin
Update PHP Doc
[SourceForge/phpwiki.git] / pgsrc / Help%2FCreateTocPlugin
1 Date: Wed,  4 May 2011 17:46:02 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0)
3 Content-Type: application/x-phpwiki;
4   pagename=Help%2FCreateTocPlugin;
5   flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
6   charset=UTF-8
7 Content-Transfer-Encoding: binary
8
9 The **~CreateToc** [[Help:WikiPlugin|plugin]] allows to create a dynamical **Table of Contents** of all headers. It also allows to number the headers in the page.
10
11 The headers might be in classic Phpwiki syntax or in Wikicreole/Mediawiki syntax (see below).
12
13 The Table of Contents can easily be inserted by clicking on the TOC button in the Edit toolbar.
14
15 == Usage ==
16 {{{
17 <<CreateToc arguments>>
18 }}}
19
20 == Arguments ==
21
22 {| class="bordered"
23 |-
24 ! Argument
25 ! Description
26 ! Default value
27 |-
28 | **extracollapse**
29 | Provide a button to hide/display the Table of Contents
30 | true
31 |-
32 | **firstlevelstyle**
33 | Style of first level numbering: //number//, //letter// or //roman//.
34 | number
35 |-
36 | **headers**
37 | Which headers to include. See below.
38 | 1,2,3,4,5
39 |-
40 | **indentstr**
41 | Indent string.
42 | &nbsp;&nbsp;
43 |-
44 | **jshide**
45 | Boolean if the Table of Contents should be initially hidden and on click expanded.
46 | false
47 |-
48 | **liststyle**
49 | List style: //dl// or //ol// or //ul//. Using //ol// is equivalent to //with_counter=1//.
50 | dl
51 |-
52 | **noheader**
53 | Boolean if the Table of Contents header should be omitted.
54 | false
55 |-
56 | **notoc**
57 | Boolean if the Table of Contents should no be displayed (headers are numbered).
58 | false
59 |-
60 | **pagename**
61 | Table of Contents of which page?
62 | current pagename
63 |-
64 | **position**
65 | Where to display the Table of Contents: //full//, //left// or //right//.
66 | full
67 |-
68 | **version**
69 | Page version
70 | most recent version
71 |-
72 | **width**
73 | Width of Table of Contents (if position is //left// or //right//)
74 | 200px
75 |-
76 | **with_counter**
77 | Boolean if hierarchical prefixes should be added.
78 | false
79 |-
80 | **with_toclink**
81 | Boolean if headers should link back to the Table of Contents.
82 | false
83 |}
84
85 === Headers ===
86
87 Syntax: a comma-separated list of levels. !!!,!!,! also allowed
88
89 {| class="bordered"
90 |-
91 ! Level
92 ! Phpwiki syntax
93 ! Wikicreole/Mediawiki syntax
94 ! HTML rendering
95 |-
96 | 1 || ~!~!~! || ~=~= || h2
97 |-
98 | 2 || ~!~! || ~=~=~= || h3
99 |-
100 | 3 || ~! || ~=~=~=~= || h4
101 |-
102 | 4 || //None// || ~=~=~=~=~= || h5
103 |-
104 | 5 || //None// || ~=~=~=~=~=~= || h6
105 |}
106
107 == Examples ==
108
109 === Default values ===
110 {{{
111 <<CreateToc>>
112 }}}
113
114 === Only two levels of headers ===
115 {{{
116 <<CreateToc headers=1,2>>
117 }}}
118
119 === Table of Contents with hierarchical numbering ===
120 {{{
121 <<CreateToc with_counter=1>>
122 }}}
123
124 === No Table of Contents, but headers are numbered ===
125 {{{
126 <<CreateToc notoc=1>>
127 }}}
128
129 === Table of Contents with hierarchical numbering, first level in roman ===
130 {{{
131 <<CreateToc with_counter=1 firstlevelstyle=roman>>
132 }}}
133
134 == See Also ==
135 * [[PhpWikiDemo:en/TextFormattingRules]]
136
137 == Known Problems ==
138
139 * If you include pages via [[Help:TemplatePlugin|Template]] or [[Help:IncludePagePlugin|IncludePage]] plugins, the Table of Contents will not contain the headers of the included pages.
140 * The Table of Contents will be incorrect if a header contains:
141 ** a [[Help:TemplatePlugin|Template]] plugin call via ~{~{ ~}~},
142 ** an image,
143 ** or a ~~.
144 * 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.
145
146 <noinclude>
147 ----
148 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
149 </noinclude>