Learn about DokuWiki
Learn about DokuWiki
Compatible with DokuWiki
Create table of contents for any wiki page in sidebar or in a wiki page. The TOC can be set using a textbox selection, the wiki:id for which can be changed as needed either manually or from its index of pages and namespaces, or it can be set to automatically load the TOC for the currently displayed page.
Use extension manager or install from zipball (refer to Plugins on how to install plugins manually).
This plugin inserts a TOC and namespace index into the sidebar or into the current page. Depending on the syntax, the TOC may be for either a user-selected page or for the current page when configured to be automatically updated. When inserted into a wiki page, it replaces the Dokuwiki TOC. There is a Configuration Option which suppresses Dokuwiki's TOC. This is useful when the
tocselect listing is placed in the sidebar and is set to be automatically updated to the current page.
You can install only one
tocselect listing at a time, that is it cannot be inserted simultaneously both into the sidebar and into the adjacent page. If this occurs, the sidebar takes precedence and the TOC/Index does not print to the page.
toselect listing can be placed vertically anywhere on the page, not just at the top. To change the horizontal alignment, you would have to make the relevant changes to
.dokuwiki .tocsel_right in the plugin directory: tocselect/style.css.
This format will create a textbox with a button. You then enter a
wiki id into the text box and click the button. The table of contents for the selected page will load beneath the textbox. The list items in the TOC are clickable. If the TOC is in a sidebar, the
tocselect TOC will retain its settings between page changes.
This format will automatically select and open the TOC for the currently displayed page. In addition it retains the selection box illustrated in the previous form, making it possible to enter an alternate page ID. But when the page reloads, it will switch back to the current ID.
Whichever of the above two syntax methods you use, the basic display and functioning is the same for both.
Index lists both pages and namespaces. The items in bold are namespaces; when clicked they will moved down the namespace hierarchy into their own namespaces.
The colon-asterisk markup
:* indicates a namespace. Page names (green) are modeled on Dokuwiki internal links and when clicked will load the Table of Contents for the selected page.
Namespace Root link, when clicked, displays the root namespace directory and all of its files and namespaces. Clicking the Up Arrow moves you up to the previous directory.
As a convenience, when the mouse moves over the UP arrow, a tooltip displays the name of the previous namespace. A tooltip also appears when the mouse goes over the
Select ID input box; this is particularly convenient in the case of long names.
The title of the listing depends on where you are at. If it is a namespace listing, then the title is
Index, as in the above illustrations. If it is a table of contents for one of the pages, then it will be labeled
Table of Contents.
The items in the
Table of Contents are links to the headings in the currently selected page.
The height and width of the TOC/Index can be reset in
tocselect/style.css. The current settings are suited to the default dokuwiki template's sidebar.
There is one configuration option:
|Suppress Dokuwiki's in-page TOCs||default: false|
When set to true, Dokuwiki's own TOCs are turned off. This configuration option is convenient if you are going to install the
toselect listings in the sidebar, preventing duplication. When the
toselect TOC is installed in a page, the Dokuwiki TOC is automatically suppressed.
There is a version which supports Dokuwiki's urlencoding for names containing non-Roman characters, either all or in part. It does not support Dokuwiki's Safe Filename encoding, though that is a TODO.
Download and install either manually or using the Manual tab of the Extension Manager:
For a complete history of the Changes to the plugin, see: github commits