Fullscreen
[Show/Hide Right Column]

PluginMakeTOC

maketoc stands for "Make a Table of Contents". It is used to generate a table of contents from the headings (made with !, !!, !!!, etc.) or (!#, !!#..) 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:




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 Version
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.
Alphanumeric, enclosed in quotes. tiki>=1.9.10
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)
levels Specify which levels you want to see in the toc. Levels are integers (1 to 6) separated with comma. Ex: levels="2,3,4,5,6" to skip the first level tiki>=6.0


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.



alias

Contributors to this page: Marc Laporte9140 points  , lindon132 điểm  , sylvie7387 points  , xavi67871 points  , Scot Wilcoxon684 points  and gluckfs@yahoo.com13 điểm  .
Page last modified on Friday 13 January, 2012 01:03:31 UTC by Marc Laporte9140 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki