]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FCreateTocPlugin
Balance headers for better readability
[SourceForge/phpwiki.git] / pgsrc / Help%2FCreateTocPlugin
1 Date: Wed, 19 May 2010 18:15:54 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC-20100415)
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 | **width**
71 | Width of Table of Contents (if position is left or right)
72 | 200px
73 |-
74 | **with_counter**
75 | Boolean if hierarchical prefixes should be added.
76 | false
77 |-
78 | **with_toclink**
79 | Boolean if headers should link back to the Table of Contents.
80 | false
81 |}
82
83 === Headers ===
84
85 Syntax: a comma-separated list of levels. !!!,!!,! also allowed
86
87 {| class="bordered"
88 |-
89 ! Level
90 ! Phpwiki syntax
91 ! Wikicreole/Mediawiki syntax
92 ! HTML rendering
93 |-
94 | 1 || ~!~!~! || ~=~= || h2
95 |-
96 | 2 || ~!~! || ~=~=~= || h3
97 |-
98 | 3 || ~! || ~=~=~=~= || h4
99 |-
100 | 4 || //None// || ~=~=~=~=~= || h5
101 |-
102 | 5 || //None// || ~=~=~=~=~=~= || h6
103 |}
104
105 == Examples ==
106
107 === Default values ===
108 {{{
109 <<CreateToc>>
110 }}}
111
112 === Only two levels of headers ===
113 {{{
114 <<CreateToc headers=1,2>>
115 }}}
116
117 === Table of Contents with hierarchical numbering ===
118 {{{
119 <<CreateToc with_counter=1>>
120 }}}
121
122 === No Table of Contents, but headers are numbered ===
123 {{{
124 <<CreateToc notoc=1>>
125 }}}
126
127 === Table of Contents with hierarchical numbering, first level in roman ===
128 {{{
129 <<CreateToc with_counter=1 firstlevelstyle=roman>>
130 }}}
131
132 == See Also ==
133 * [[PhpWikiDemo:en/TextFormattingRules]]
134
135 == Known Problems ==
136
137 * 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.
138 * The Table of Contents will be incorrect if a header contains:
139 ** a [[Help:TemplatePlugin|Template]] plugin call via ~{~{ ~}~},
140 ** an image,
141 ** or a ~~.
142 * 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.
143 * 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.
144
145 <noinclude>
146 ----
147 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
148 </noinclude>