Jump to content

Template talk:RankedMedalTable

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Sortable?

[edit]

Is it a good idea? --Howard the Duck 13:28, 8 August 2007 (UTC)[reply]

There are tradeoffs. See, for instance, 2007 Pan American Games medal count, which uses a variant of this which is sortable. The sortable table doesn't handle rowspans well, which makes showing ties a little less nice. The "rank" column is typically input manually, so wouldn't be in order after the table was sorted by anything other than the default (there may be some way of fixing this, but I don't know it). It also precludes the use of a total row, unless there's some way of marking rows as non-sorting that I don't know of.
On the other hand, it would help deal with the arguments about whether to sort by gold or by total medals. And being able to sort alphabetically is nice as well. -- Jonel (Speak to me) 13:55, 8 August 2007 (UTC)[reply]
The only instance where the sorting can be bad is in the instance of rowspan/colspans. Otherwise, it'll help in whatever way an org sorts its medals. I still dunno though. --Howard the Duck 14:09, 8 August 2007 (UTC)[reply]
Well, I think the Pan American count shows that sortable can work and we'd just need to clean up the rowspans to be individual cells. If you want more input, I'd recommend asking at WT:OLYMPICS. -- Jonel (Speak to me) 14:17, 8 August 2007 (UTC)[reply]
I wonder, can the sortable thingy can be made optional? I dunno who the Pan-Am list did that. --Howard the Duck 14:24, 8 August 2007 (UTC)[reply]
I made it optional; now the problem is the "bronze" row wraps. See FIBA Asia Championship#Performances by nation for example. --Howard the Duck 14:30, 8 August 2007 (UTC)[reply]
Looks like just a problem with the width parameters. Making the columns a bit wider ought to fix that. -- Jonel (Speak to me) 14:42, 8 August 2007 (UTC)[reply]
Yes but isn't it too wide already? The main body of the table should contain about 2 numerals. --Howard the Duck 14:47, 8 August 2007 (UTC)[reply]
Yeah, making the column headings fit on one row does make the columns a good deal wider than they need to be for the body. I have no idea how to solve that problem, though. -- Jonel (Speak to me) 14:54, 8 August 2007 (UTC)[reply]
How about making the text size smaller? Like 95%? I'll try it. But it can be too small now. --Howard the Duck 15:14, 8 August 2007 (UTC)[reply]
I tried at 95% but it is still wraps. Anything smaller than that can be bad. --Howard the Duck 15:18, 8 August 2007 (UTC)[reply]
Why don't we use little pictures ( ) instead of words? --Me... 08:16, 10 August 2008 (UTC)[reply]

The sort button for the Total column does not work. Clicking it produces an "Error on page" message. Surely this is a coding problem rather than intentional; if the table is not meant to be sorted by total then the sort icon should not be there at all. The All-time Olympic Games medal table is sortable on all columns. Mbiyetifono (talk) 17:53, 2 October 2009 (UTC)[reply]

On what article do you see this error? — Andrwsc (talk · contribs) 18:14, 2 October 2009 (UTC)[reply]
It occurs in all the Olympics medal table pages I checked, e.g. 1968 Summer Olympics medal table, as well as at least one of the games pages (1980 Summer Olympics). Mbiyetifono (talk) 21:18, 6 October 2009 (UTC)[reply]
All seems to be working now. Thanks to whomever fixed the error. (talk) 23:38, 23 October 2009 (UTC)[reply]

Left-align

[edit]

Nearly every example of tables using this template left-align the nations column. Is there a way to do this in the template itself? SeveroTC 01:15, 17 December 2007 (UTC)[reply]

No, that is a limitation of wiki table syntax. There is no way of specifying (in the header) a style value to be used for an entire column. I agree that would be helpful! Andrwsc (talk) 17:31, 17 December 2007 (UTC)[reply]

Problem

[edit]

See 2007 Pan American Games medal table. When sorting by Gold from fewest to most, it seems odd to me to see Peru (with 4 silver, 8 bronze) to be ranked above (and therefore "worse") than Trinidad and Tobago (with 1 silver, 3 bronze). Same is true when ranking by other medal types, the sub-ordering seems a little odd to me. (Transcript from Wikipedia:Featured list candidates/2007 Pan American Games medal table/archive2) Felipe Menegaz 16:55, 2 December 2009 (UTC)[reply]

That has nothing to do with this template; it is the behaviour of the sortable wikitable CSS class. If you want a multi-column sort, you have to order each column in turn, from bottom to top priority. (e.g. click on bronze first, then silver, then gold) See m:Help:Sorting. — Andrwsc (talk · contribs) 17:28, 2 December 2009 (UTC)[reply]

Documentation

[edit]

{{editprotected}} This protected template should transclude its documentation at /doc with {{documentation}}. — Christoph Päper 21:27, 26 July 2010 (UTC)[reply]

 DoneAndrwsc (talk · contribs) 21:37, 26 July 2010 (UTC)[reply]

Column headers

[edit]

The cells containing "Gold", "Silver", "Bronze" are just as much column headers as are the other cells. They should be also marked up with '!' not '|' (i.e. <TH> not <TD>). Once that is done, the "font-weight:bold;" part of the style declaration becomes superfluous and should be removed:

  • ! scope="col" style="background:gold; width:{{#ifeq:{{{class|}}}|wikitable sortable|6em|4.5em}};" | Gold
  • ! scope="col" style="background:silver; width:{{#ifeq:{{{class|}}}|wikitable sortable|6em|4.5em}};" | Silver
  • ! scope="col" style="background:#cc9966; width:{{#ifeq:{{{class|}}}|wikitable sortable|6em|4.5em}};" | Bronze

MOS:DTT#Overview of basics gives the current guidance on marking up column headers. --RexxS (talk) 03:09, 10 August 2011 (UTC)[reply]

Done. Ucucha (talk) 21:11, 11 August 2011 (UTC)[reply]
Thanks! --RexxS (talk) 23:31, 12 August 2011 (UTC)[reply]

Sortable medal columns

[edit]

The cells containing "Gold", "Silver", "Bronze" do not have little sort icons next to them. They are sortable, but need to indicate so. Please make them consistent with the other column headings. --99of9 (talk) 06:13, 12 January 2012 (UTC)[reply]

Done It's not a matter of adding sorting icons, it's a matter of not overriding the background image set by the table sorter when setting the background color of the cells. Anomie 15:29, 13 January 2012 (UTC)[reply]

Looks Great on Wiki-en, but did you think of other languages?

[edit]

Yes, it looks great on en, but most other language copy and paste ready made Templates from en. Aren't we lucky? No! It usually means copying and pasting 30+ (and those rotten docs!!!) Did we really need to change the wheel again? Take a look at the Welsh Wiki (cy) here, please. It means creating 3 templates for 200+ countries = a lot of work. Any cavalries here? Maybe we need a bot to do the job, but my wrist aches just thinking about it! With my tongue in my cheek... Llywelyn2000 (talk) 14:33, 29 July 2012 (UTC)[reply]

You may want to look into whether cy:Special:Import is enabled, which would make it much easier to copy things over. Anomie 23:46, 30 July 2012 (UTC)[reply]

Table caption

[edit]

With this template it is not possible to set a table caption, since the |+ should be placed right between the lines this template covers. Therefore, could the following line please be inserted between the second and third line (the one defining class and style, and the one with |-):

{{#if:{{{caption|}}}|{{!}}+{{{caption}}}}}

This adds the optional parameter caption, making it possible to set the table's caption.

An example of the code (that I have tested) can be found at this template's sandbox.  thayts t  13:19, 2 August 2012 (UTC)[reply]

 Done; thanks! Chris Cunningham (user:thumperward) (talk) 10:38, 7 August 2012 (UTC)[reply]
Thank you!  thayts t  11:17, 7 August 2012 (UTC)[reply]

Accessibility

[edit]

Building on issues raised during this FLC and looking at the table accessibility features on 2009 Mediterranean Games medal table: There still appear to be some accessibility issues around scoping in this template. Maybe there could be some inclusion of the {{ntsh}} functionality within the {{RankedMedalRow}} one too? Bill - would you be able to get the visually impaired Hindi user to report their issues with the current template so we can define the problem? Andrwsc would you be able to investigate/assist as you did in previous edits on this template? SFB 20:52, 18 July 2013 (UTC)[reply]

He is not active anymore, but I'll leave the message anyway. During the London Games, I had gotten into a dispute with some other user about the accessibility issue. In the meantime, user Anirudh explained on local VP how the new table helped. — Bill william comptonTalk 04:12, 19 July 2013 (UTC)[reply]

Template-protected edit request on 7 December 2017

[edit]

I suggest adding an optional column (possible?) for the number of athletes participating under each team to provide a good basis for comparison of involvement and achievement. Jak (talk) 00:19, 7 December 2017 (UTC)[reply]

Not done: please establish a consensus for this alteration before using the {{edit template-protected}} template. — JJMC89(T·C) 00:29, 7 December 2017 (UTC)[reply]

Adding "Number of Athletes" Column

[edit]

I suggest adding an optional column (possible?) for the number of athletes participating under each team to provide a good basis for comparison of involvement and achievement. --Jak (talk) 02:59, 7 December 2017 (UTC)[reply]

Autocollapse

[edit]

How is it possible to use it in autocollapsed state? --Pelmeen10 (talk) 18:39, 3 March 2018 (UTC)[reply]

Seeking some input on {{Medals table}}. Looking at making a unified table template that would simplify this one. --Zackmann08 (Talk to me/What I been doing) 03:50, 18 September 2018 (UTC)[reply]