Create a table of contents from section headings.
PluginMakeTOC
maketoc stands for "Make a Table of Contents". It is used to generate a table of contents from the headings (made with !, !!, !!!, etc.) on the page that it appears on. It is useful for placing links to major sub-sections of a large document.The tool toc is something similar. It is used for structures of many pages. toc will show a table of contents built from the titles of the pages within that structure of wiki pages.
Creating a Table of Contents List
Use the {maketoc} plugin to automatically create a table of contents, based on the headings on the current wiki page.For example, using {maketoc title="On This Page" showhide=y} on this page will produce:
On this page
You can use the following options to customize the table of contents list (Default means that the option is not specified as part of {maketoc} ):
| Option | Description | Valid Values |
|---|---|---|
| type | For backwards compatibility from older syntax: {maketoc:box} . Optional. | box |
| maxdepth | Defines how many heading levels to include in the list. If 0, then all headings will be included. Default = 0 | Numeric |
| title | Title (heading) of the table of contents. Use title="" to have no title. Default = "Table of contents" Note: The title will be translated, if available. Introduced in 1.9.10 |
Alphanumeric, enclosed in quotes. |
| showhide | Create a link that will collapse (that is, hide) the table of contents link. Default = n | y or n |
| nolinks | Create the table of contents without links. Default = n (links will be created). | y or n |
| nums | Specify if the items in the table of contents listing should be numbered. Default = n (use bullets instead of numbers). The style of the numbering can be customized to use "i, ii, iii" or others through css (see below) | y, y, Force (same as y) |
The syntax of {maketoc} is:
{maketoc option1=value1 option2=value2}
Note the space between each option/value pair.
Remarks:
Example:{maketoc:box} produces a table of contents without respect to the hierarchical order.
Example:
{maketoc title="Also On This Page" showhide=y} produces a table of contents with a title of "Also on this Page"
maketoc does not like it when it is used more than once on a page.
Customizing the style of the numbering
You can override the style of the automatic numbering of the headings with CSS (cascading style sheets).Something like
.wikitext ol {list-style-type: lower-roman;}
This can be added to the end of the stylesheet you're using, or put in a custom.css stylesheet in the directory or your theme.
More information
Wiki-Syntax Lists
CSS?
Contributors to this page: lindon
,
SEWilco
,
marclaporte
,
sylvie
,
gluckfs@yahoo.com
and
xavi
.
Page last modified on Saturday 06 March, 2010 06:02:35 UTC by lindon
.
Sidebar
Sidebar
To register
To have an account at this site, please register at Tikiwiki.org
, and then use that user name and password to log in here.
