History: PluginAutoTOC
Preview of version: 2
New in Tiki23, this plugin allows to automatically generate a table of contents (TOC) in a wiki page. It permits to leverage the Auto TOC feature, with more flexibility on a page per page basis.
Its use is relatively simple, you just have to add its syntax code in a wiki page in which headings are located (tag H1 to H6).
Parameters
Display a Table Of Contents in a wiki pageIntroduced in Tiki 23. Required parameters are in
bold
.Go to the source code
Preferences required: wikiplugin_autotoc
Parameters | Accepted Values | Description | Default | Since |
---|---|---|---|---|
activity |
yes no |
Determine if the Table Of Contents will appear in the active page or not. | yes | 23.0 |
title |
Title for the Table Of Contents | 23.0 | ||
offset |
int | Offset of Table Of Contents. Offset default value is 15 | 15 | 23.0 |
align |
right left page |
Position of the Table Of Contents, either right, left, page ("right" is the default and "page" will display the table of contents where it is placed in the wiki page.). | right | 23.0 |
levels |
text separator: : |
Specify which levels you want to see in the TOC. Levels are integers (1 to 6) separated with colon. Example : levels="1:2:3" to show only level 1, 2 and 3 headers. |
23.0 | |
mode |
off inline |
Change the display of the Table Of Contents for wiki pages to inline. | off | 23.0 |
tabs |
no yes |
Determine if the table of contents includes the content of Tabs plugin or not. | no | 25.0 |
tabset_names |
text separator: , |
If tabs = yes, determine the Tabset names that uses the plugin. Use comma separator. Example : tabset_names="tab1,tab2,tab3" to show only the headers included in the tab1, tab2 and tab3 |
25.0 | |
tabset_panes |
text separator: , |
If tabs = yes, determine the Tabset panes that uses the plugin. Tabset panes are integers (1 to x) separated with comma. Example : tabset_panes="1,2,3" to show only 1, 2 and 3 headers of selected tabs names |
25.0 |
Enabling/Disabling
To enable/disable PluginAutoTOC, go to Control Panels » Main Features » Edit and Plugins, then check "Experimental" option in "Preference Filters". Please, see the screenshot below :
Usage
The plugin settings offer more ways to work with the table of contents: make it visible or not, position it on the left or right side of a wiki page, hide the titles of your choice, etc.
Activity
Is the only mandatory parameter. Its possible values are "yes/no", yes to display the table of contents and no to not display it.
Note: When you add the PluginAutoTOC to a page that contains a table of contents generated by the Auto%20TOC functionality, the latter will be replaced by the one generated by the PluginAutoTOC.
Example:
The code below will add a table of contents to the right of a wiki page if there are headings (H1 to H6).
{autotoc activity="yes"}
https://sourceforge.net/p/tikiwiki/code/77744
https://sourceforge.net/p/tikiwiki/code/77745