Problem with class names "hide" and "show".

Classes names "hide" and "show" are conflicting with popular frameworks (Bootstrap as example), so TOC does not work as expected. Is it possible to change names to something more individual like "PmTOC-hide" and "PmTOC-show" for example? Or make it possible to change class names from config.php.

Finar February 24, 2020, at 11:05 AM

Added to Subversion for the next version. --Petko February 24, 2020, at 12:53 PM

With MinNumber = -1

The feature description says:

$PmTOC['MinNumber'] = -1; # the TOC will not be automatic, only the (:toc:) directive will create a table of contents in the page.

but for a page without (:toc:) and with one level-2 heading I get the TOC.

The key line is pmwiki-utils.js line 156

var shouldmaketoc = ( !tocdiv && toc_headings.length < dtoc.MinNumber && dtoc.MinNumber != -1) ? 0:1;

Here's some console log for this page

pmwiki-utils.js:157     tocdiv: null
pmwiki-utils.js:158     !tocdiv: true, length: 1, MinNumber: -1
pmwiki-utils.js:159     shouldmaketoc: 1

Shouldn't shouldmaketoc be set to 0 for this page?

In config.php I have:

$PmTOC['Enable'] = 1;
$PmTOC['MinNumber'] = -1;
$PmTOC['MaxLevel'] = 3;
$PmTOC['EnableBacklinks'] = 1;

Thank you --SteP February 01, 2020, at 05:45 PM

Good catch, I'm releasing 2.2.126 now. I am deprecating MinNumber = -1 (which should work for a while), but from now on use MinNumber = 9999 or larger to suppress the automatic TOC (documentation updated). --Petko February 01, 2020, at 07:09 PM

Thank you for fixing this issue and for the new release: downloaded, tested, I can confirm it works for me. --SteP February 01, 2020, at 07:29 PM

This is a talk page for improving PmWiki.TableOfContents.