History: PluginAutoTOC
Source of version: 3
Copy to clipboard
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 {pluginmanager info="description|parameters|paraminfo" plugin="autotoc" showparamtype="y" showtopinfo="y"} !! 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 : {img src="display1784" link="display1784" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" alt="PluginAutoTOC Enabling/Disabling"} !! 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 TOC)) feature, 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). {CODE()}{autotoc activity="yes"}{CODE} !!! Align Allows you to add a TOC either to the right, or left, or at the same position where will be placed the Plugin. __Note__ : By default the table of contents will be added to the right of the page. !!!! Examples : 1. Align the TOC to the right of wiki page This code {CODE()}{autotoc activity="yes"}{CODE} or {CODE()}{autotoc activity="yes" align="right"}{CODE} will produce this : {img src="display1785" link="display1785" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" alt="PluginAutoTOC Align right"} 2. Align the TOC to the left {CODE()}{autotoc activity="yes" align="left"}{CODE} Using this code above, you will get a result like this one : {img src="display1786" link="display1786" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" alt="PluginAutoTOC Align left"} 3. Place the TOC in the page When you give the value "page" to the parameter "align", the table of contents is shown at the place where you put the Plugin in the page. {CODE()}{autotoc activity="yes" align="left"}{CODE} With the previous code, you will have a result like this one: {img src="display1787" link="display1787" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" alt="PluginAutoTOC Align page"} !!! Title This parameter allows to add a title to a table of contents only when the value of the parameter align="page", in other cases the title will not be displayed. !!!! Example {CODE()}{autotoc activity="yes" align="page" title="THIS IS A TITLE"}{CODE} Will produce a result like this : {img src="display1788" link="display1788" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" alt="PluginAutoTOC parameter title"} https://sourceforge.net/p/tikiwiki/code/77744 https://sourceforge.net/p/tikiwiki/code/77745