Last modified: 2014-11-04 22:52:32 UTC
At the top of image namespace pages there is a Mediawiki namespace table of
contents leading to:
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.
For those who are still confused, here is an example image page from the commons:
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
Hope that gives you a better idea of what is needed.
(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.)
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.
Note that the opener is referring to #filetoc not #toc.
In other words the horizontal grey bar on top of File-pages . So the parser isn't related as much.
The TOC on category pages already works for wiki markup section headings. The only thing that's missing are the automatically generated section headings.
(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
> 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):
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.
badon, would you be interested in using developer access https://www.mediawiki.org/wiki/Developer_access to implement this in MediaWiki?
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?
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.
Shikha: Do comment 7 and https://www.mediawiki.org/w/index.php?title=Annoying_little_bugs&oldid=909298#Helpful_information_for_new_MediaWiki_coders help?
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.