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