Last modified: 2013-05-06 15:20:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T19587, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17587 - alias __TOC__ to {{#TOC}} and add TOC style options to such parser function
alias __TOC__ to {{#TOC}} and add TOC style options to such parser function
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-20 11:00 UTC by Purodha Blissenbach
Modified: 2013-05-06 15:20 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Purodha Blissenbach 2009-02-20 11:00:54 UTC
out of all magic names of the form __some-name__ only __TOC__ inserts something at the place where it is included in the wiki
text. All other of the kind influence only how a page is rendered.

Thus, for the sake of consistency, add another name, like {{#TOC}} or similar, and after a while phase __TOC__ out.

Not proposed here and now, but something possibly worth thinking about: There could later be {{#TOC:parameters}} as to influence the style of the toc, such as with/out numbering,
right/center/left, with/out "hide" button, initially un/hidden, general or page-specific sticky hide, width, CSS-id, CSS-class, etc.
Comment 1 Krinkle 2011-04-04 13:52:21 UTC
{{TOC}} is a bit ofrisk regarding templates that currently exit and do this already.

{{#TOC}} would work I guess, although some of the options listed there seem like overkill / too many options, the following sound useful though. Implementation ala [[File:]] sounds great, so that the order won't matter, nor are parameter names required and the values can be easily localized for content language.
* left/right (unnamed parameter, default left, inserts a class, styled via shared.css)
* maxlevel=[1-6] (dont show headings higher than this level)
* class='' (adds additinonal classes to the default 'toc' class, such as visualClear, or fancy-toc)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links