Can MW support "conditional" TOCs?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can MW support "conditional" TOCs?

Matt England
My MW 1.4.0 server always displays a TOC whenever there are more then a
certain number (4?) sections in a page.

Is there a means to configure MW such that it _never_ displays a TOC unless
the markup has a "__TOC__" in it?

My group is running 1.4.0 (yes, I know this is ancient) server on one
system to be upgraded soon, am building a separate 1.5.6 server.

-Matt

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Fxp
Reply | Threaded
Open this post in threaded view
|

Re: Can MW support "conditional" TOCs?

Fxp
Hi Matt,

The actual setting is : at page load the TOC is displayed as a
developped tree, and if the user wishes to hide it, he can close the
tree. A very simple change could be to reverse this: for any page having
more than 4 titles, the page would have a "show content" link, to let
the user roll the tree open... This is a simple hack of the javascript
if I am not mistaken.


The second more radical option would be to completely hack the mediawiki
engine : you might want to search for __NOTOC__ in the file
includes/parser.php to change this, either by setting option or hacking
the file.

Fran├žois

Matt England wrote:

> My MW 1.4.0 server always displays a TOC whenever there are more then a
> certain number (4?) sections in a page.
>
> Is there a means to configure MW such that it _never_ displays a TOC unless
> the markup has a "__TOC__" in it?
>
> My group is running 1.4.0 (yes, I know this is ancient) server on one
> system to be upgraded soon, am building a separate 1.5.6 server.
>
> -Matt

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l