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