Last modified: 2011-09-20 15:01:48 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 T33038, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31038 - Add TOC index.php parameter
Add TOC index.php parameter
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Unprioritized trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.mediawiki.org/wiki/Manual:...
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-20 14:38 UTC by Dan Jacobson
Modified: 2011-09-20 15:01 UTC (History)
2 users (show)

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


Attachments

Description Dan Jacobson 2011-09-20 14:38:02 UTC
There should be a toc= or TOC= parameter
( http://www.mediawiki.org/wiki/Manual:Parameters_to_index.php )
to force a table of contents.

That way one could get a TOC, without needing to edit or even editing permission,
nor mess up ones preferences or even register an account.

Indeed, one can't even force it via preferences, as all there is is
"[x] Show table of contents (for pages with more than 3 headings)"

You see sometimes one might want to a table of contents even if there
are only two items.

And one shouldn't need write permissions on a site to see it.

E.g., when one wants to copy the anchors with ones mouse, without needing to dig them out of the HTML page source.

Let's see, TOC=true, TOC=false are needed,
(and maybe even TOC=4 TOC=4,11 etc. which I suppose could be a range of what items to show... OK, never mind that.)
Comment 1 Chad H. 2011-09-20 14:39:44 UTC
This isn't currently possible. The TOC is generated by the parser, which *must not* be dependent on query parameters from WebRequest.
Comment 2 Max Semenik 2011-09-20 14:45:43 UTC
index.php is intended for end-users only, users must not be forced to type some obscure parameters to get to some obscure functionality. On the other hand, we have a rich machine-readable interface that can do this: http://www.mediawiki.org/w/api.php?action=parse&page=API:Parsing_wikitext&prop=sections
Comment 3 Dan Jacobson 2011-09-20 15:01:48 UTC
Gosh, that API result still is nowhere easier for the average user to obtain or cut and paste usable URLs from. OK, I have come up with the Final Solution, Bug 31039.

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


Navigation
Links