Loading...
 
Skip to main content

History: PluginMaketoc

Source of version: 30

Copy to clipboard
            ^ This is deprecated, and buggy, and will be removed. Please use ((Auto TOC)) instead. {sign user="marclaporte" datetime="2019-07-20T06:48:40+00:00"} ^


! maketoc
__maketoc__ stands for "Make a Table of Contents". It is used to automatically 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 ((PluginToc)) is something similar. It is used for ((structures)) of many pages. ((PluginToc)) will show a table of contents built from the titles of the pages within that structure of wiki pages.


!! Parameters
{FANCYTABLE(head="Option ~|~ Description ~|~ Valid Values ~|~ Since")}
type ~|~ For backwards compatibility from older syntax: __~np~{~/np~maketoc:box~np~}~/np~__. 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. ~|~ 2.0
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, n, 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 ~|~ ~|~ 6.0
{FANCYTABLE}

{REMARKSBOX(type="warning" title="Warning")}''You may encounter problems if maketoc is used more than once on a page.''{REMARKSBOX}
{REMARKSBOX(type="info")}While the syntax used for maketoc is similar to the syntax used to call plugins, maketoc is not a plugin.{REMARKSBOX}
Also, only the lower case syntax may be used with maketoc as shown below. See [Wiki+Plugins#Plugin_Syntax | Plugin Syntax] for more information.

!! Example
''This code:''
{CODE(colors="tiki")}
{maketoc title="On this page" showhide="y"}
{CODE}

''Would produce on this 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 
{CODE(colors="css")}
.wikitext ol {list-style-type: lower-roman;}
{CODE}

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.

!! Related pages
* ((Auto TOC))
* ((PluginAutoTOC))
* ((PluginToc))
* ((Wiki-Syntax Lists))

!!Alias
* (alias(MakeToc))

        

History

Information Version
Marc Laporte 31
Marc Laporte 30
Marc Laporte 29
Yves Kipondo 28
Marc Laporte 27
Philippe Cloutier maketoc is not a plugin 26
olinuxx "related pages + alias " consistency across the wiki 25
olinuxx "related pages + alias " consistency across the wiki 24
lindon 23
Marc Laporte 22
lindon 21
hhm typo corrected 20
Marc Laporte 19
lindon 18
lindon Fancy Table Plugin modified by editor. 17
sylvie 15
sylvie 14
lindon 13
lindon 12
Xavier de Pedro added info from chibaguy from irc 11
Scot Wilcoxon description, and mention toc is a tool so the sentence flows a little better 10
Marc Laporte 9
Marc Laporte 8
sylvie 7
gluckfs@yahoo.com 6
gluckfs@yahoo.com 5
gluckfs@yahoo.com 4
gluckfs@yahoo.com 3
Xavier de Pedro 2
Xavier de Pedro 1