Thank you Mr. Church, Since generating the toc involves a function call (or a set of?), shouldn't I be able to create a portlet within the skin.php that will call the function and generate a table within it instead of within the content div? Perhaps not quite that simply, but something like that? Or is the way it's designed make that impossible? Any help/direction appreciated
Thanks, Ashley
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Wednesday, July 11, 2007 2:34 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Table of Contents
On 10/07/07, Ashley Price (asprice) asprice@cisco.com wrote:
Hi Everyone, I was wondering if anyone knows what section of the code and/or where to find the code that determines whether or not to generate a Table of
Contents and then generates the TOC if required? I have hopes to actually put the table of contents into a portlet (like navigation and the toolbox are)
The Parser is responsible for generating the table of contents, using magic words present on the page to override this behaviour, e.g. __TOC__, __FORCETOC__ and __NOTOC__. Tables of content are generated for all users, and suppressed for those users who don't want them using CSS.
The actual table is generated in Parser::replaceHeadings(), although there are various other little bits of code dotted around which handle the above magic words, e.g. setting placeholders if the position is being overridden, or if a table is being suppressed for the whole page, etc.
Rob Church
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l