[Mediawiki-l] How to turn off numbering in table ofcontents liston pages with multiple headings

Matthew Simoneau Matthew.Simoneau at mathworks.com
Wed Dec 22 21:40:38 UTC 2004


> "Auto-number headings" applies to the numbering of headings within the
> body of the article (as I just discovered by enabling it). What I want
> to be able to do is disable the auto numbering of table of contents
> entries in the table of contents that appears at the *beginning* of
the
> article.

Now I understand what you want.  There isn't any way to do it without
touching the code.  These are the relevant lines from Parser.php:

if( $doNumberHeadings || $doShowToc ) {
	$tocline = $numbering . ' ' . $tocline;
...
}

Since $doShowToc will be true, you'll always hit that middle line.
Also, the numbering is attached with the same style as the text, so
there's no way to hide it with CSS.  The smallest change you could make
to the PHP-file to do this is to comment out the middle line above.

Sincerely,
Matthew Simoneau



More information about the MediaWiki-l mailing list