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

Mike Broschinsky mbroschi at utah.gov
Wed Dec 22 21:53:44 UTC 2004


Matthew:

Thanks! I just commented that line, and the result is exactly what I
wanted. I suspected that hacking Parser.php would be necessary, but
hoped it wouldn't be.

I think maybe I'll make a feature request.

Thanks again!

Mike

>>> Matthew.Simoneau at mathworks.com 12/22/04 2:40 PM >>>
> "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
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l at Wikimedia.org 
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l



More information about the MediaWiki-l mailing list