Last modified: 2014-11-04 22:52:32 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 T10178, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8178 - Make table of contents for category pages: Subcategories, Pages, Media
Make table of contents for category pages: Subcategories, Pages, Media
Status: NEW
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
unspecified
All All
: Low enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-07 11:43 UTC by Duncan Harris
Modified: 2014-11-04 22:52 UTC (History)
8 users (show)

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


Attachments

Description Duncan Harris 2006-12-07 11:43:07 UTC
At the top of image namespace pages there is a Mediawiki namespace table of
contents leading to:
*Image
*File history
*File links
*Metadata.

There should be a similar at the top of categories leading to:

* Subcategories (#mw-subcategories)
* Pages (#mw-pages)
* Media (#mw-category-media)

I suggest that there also should be a fourth leading to the bottom where it
shows the parent categories.

This ought to be easy to fix.
Comment 1 Duncan Harris 2006-12-08 22:41:10 UTC
PS

For those who are still confused, here is an example image page from the commons:

http://commons.wikimedia.org/wiki/Image:Cambridge-longplatform-south-06.jpg

In the html the bit at the top is called "filetoc", though I cannot find it in
[[Special:Allmessages]].  Copy the formatting anyway; it should come after the
title but before the text.

I've found the anchor tag for the parent categories and it is #catlinks, so add
that too.

Hope that gives you a better idea of what is needed.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-08-28 18:38:52 UTC
(Note: not related to bug 1502, clarifying summary.  I don't actually think this is easy to fix, since the TOC is currently generated by the Parser from wikitext, I think, in which case it needs to be abstracted out before it can be properly fixed.)
Comment 3 Derk-Jan Hartman 2010-06-21 23:59:00 UTC
This would be very easy to do, if we do it just like with files. (has the potential of having 2 tocs in that case, but having so much content in a category page that the content toc is actually triggered is rather rare I think.)

The question is, do we really want it.
Comment 4 Krinkle 2011-06-08 21:30:22 UTC
Note that the opener is referring to #filetoc not #toc.

In other words the horizontal grey bar on top of File-pages [1]. So the parser isn't related as much.


[1] http://en.wikipedia.org/wiki/File:Example.jpg
Comment 5 badon 2011-12-29 21:50:24 UTC
The TOC on category pages already works for wiki markup section headings. The only thing that's missing are the automatically generated section headings.
Comment 6 badon 2011-12-29 21:54:48 UTC
(In reply to comment #3)
> This would be very easy to do, if we do it just like with files. (has the
> potential of having 2 tocs in that case, but having so much content in a
> category page that the content toc is actually triggered is rather rare I
> think.)
> 
> The question is, do we really want it.

Yes, ESPECIALLY when there is a lot of content on a category page. For example, I have a root (or "top") category that turns out to be a good place for documenting why things are organized the way they are (login with Demo/test):

http://www.coincompendium.com/w/index.php/Category:Core

There's several wiki markup section headings that you have to scroll through before you can find the auto-generated category information headings. The size of that Core category just keeps getting bigger as the wiki grows, and a TOC becomes more and more useful for navigating it.
Comment 7 Sumana Harihareswara 2012-12-09 18:20:23 UTC
badon, would you be interested in using developer access https://www.mediawiki.org/wiki/Developer_access to implement this in MediaWiki?
Comment 8 badon 2012-12-12 19:03:12 UTC
Yes, I am interested, but it will take me a ridiculous amount of time to get up to speed enough to feel confident in doing something novel and useful. I would prefer to achieve that by studying code and internally documenting it with code comments to a level of detail and verbosity that comments could dominate the code. As I'm sure you're aware, I'm not exactly a beginner programmer, but I consider myself to still be quite unfamiliar with PHP and the MediaWiki code base. So, my comments may seem pedantic or annoying from the point of view of someone who is already past that entry-level learning curve, although I've never actually had anyone complain in other projects I've worked on. 

Mediawiki is the largest collaborative project I have been involved in, and I have noticed perhaps 1 or 2 WMF-affiliated developers that seem to do things like I do, but they're unusual (and quite important, talented WMF contributors). If there's no problem with me starting small with just basic things like comments, then progressing to code cleanup, etc, then I think I'm ready to begin advancing to more direct contributions to MediaWiki and WMF using developer access.

The upside to starting this way is if I screw something up due to inexperience, it's only comments that don't break anything. I love starting small.

What do you think, Sumana?
Comment 9 Shikha Shree 2014-02-17 14:24:50 UTC
I am new to FOSS and mediawiki how do I start on this bug and how do I replicate the error on my local machine.
Comment 11 Lewis Cawte 2014-08-08 19:29:05 UTC
Removing 'easy' keyword per discussion with Legoktm at Wikimania 2014 who couldn't work out how this was easy to do because the sections of code that work out if the category has members and the outputting of the page are in two different classes?

I know some stuff about MW and I spent a large amount of a day trying to work out how to do this bug without rewriting the entire of the Category page system.

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


Navigation
Links