Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a23def5fbe0bcf6a

Jump to content

Template:Medals table/doc

From Wikipedia, the free encyclopedia

A template for generating a medals table for a sporting event where the totals and ranks are automatically calculated.

Template basics

[edit]
{{Medals table
 | caption        = 
 | host           = <!-- Text to display after host color box -->
 | show_limit     = <!-- Will limit to displaying only the first N rows if this param is provided -->
 | remaining_text = <!-- Text to display for the remaining N rows (default is 'Remaining') -->
 | flag_template  = <!-- Optional, will default to use Template:Flagteam -->
 | age            = <!-- required IF flag_template requires a secondary (age) parameter -->
 | event          = <!-- required IF flag_template requires a secondary (non-age) parameter -->
 | team           = <!-- Optional, will default to Nation -->
 | source         = <!-- External link or reference -->

 ... <!-- For a list of valid IOC values, see [[List of IOC country codes]] -->

 | gold_IOC    =
 | silver_IOC  = 
 | bronze_IOC  =
 | host_IOC    = <!-- leave blank UNLESS this is the host nation -->
 | name_IOC    = <!-- Optional override of default which is {{flag_template|IOC}} -->
 | note_IOC    = <!-- Option note that is added after the nation name -->
}}

  *   Host nation ({{{host}}})

{{{caption}}}
Rank{{{team}}}GoldSilverBronzeTotal
1 United States (USA){{{note_USA}}}0000
Totals (1 entries)0000

Parameters

[edit]

Some of the optional parameters

Parameter Explanation
captionThe caption or title given to the table
hostThe host entity. If set to a 3 letter code matching one of the rows, the host name will be automatically formatted. Otherwise this param will override the host text.
flag_templateWhich of the many flag templates to use. If left blank, {{flag country}} will be used.
ageFor flag templates which require a 2nd parameter (such as {{bku|age|country}}).
eventFor flag templates which require a 2nd parameter (such as {{flag IOC team|country|event}}).
teamAn optional override for the header to column 2. The default is "Nation".
hide_rankWhen set the rank column will be hidden.
hide_totalsWhen set the totals row will be hidden.

For a list of valid IOC values, see List of IOC country codes

In case of multiple hosts, use |host1= and |host2=

Blank with all IOC codes

[edit]

The below template contains a condensed version of the template with ALL IOC country codes included. Obviously not all are needed. You are free to pick and choose those that you need for your implementation of the template.

Event & Flag Template

[edit]

If {{{event}}} and {{{flag_template}}} are given values, then the nation value will be rendered as {{<flag_template>|<IOC>|<event>}}.

So for example, with the following params:

{{Medals table
 | event    = 2018 Winter 
 | flag_template = Flag IOC team
 | nation1  = USA
 | nation2  = CAN
}}

The nations will be rendered as  United States (USA) &  Canada (CAN)

Example

[edit]
{{Medals table
 | caption        = 
 | host           = 
 | show_limit     = 
 | remaining_text = 
 | flag_template  = 
 | event          = 
 | source         = <ref>{{Cite web |title=Info System:         Medals / Medal Tally |url=http://wuni15.sportresult.com/HIDE/en/MedalTally?sport=00&medalKind=DefaultSports |url-status=dead |archive-url=http://web.archive.org/web/20230225120927/http://wuni15.sportresult.com/HIDE/en/MedalTally?sport=00&medalKind=DefaultSports |archive-date=2023-02-25 |access-date=2025-09-25 |website=wuni15.sportresult.com}}</ref>
 | gold_FRA = 7 | silver_FRA = 4 | bronze_FRA = 4
 | gold_GBR = 5 | silver_GBR = 5 | bronze_GBR = 5
 | gold_USA = 5 | silver_USA = 3 | bronze_USA = 2
 | gold_AUS = 3 | silver_AUS = 5 | bronze_AUS = 7
 | gold_RSA = 3 | silver_RSA = 4 | bronze_RSA = 3
 | gold_GER = 1 | silver_GER = 3 | bronze_GER = 3
}}
RankNationGoldSilverBronzeTotal
1 France (FRA)74415
2 Great Britain (GBR)55515
3 United States (USA)53210
4 Australia (AUS)35715
5 South Africa (RSA)34310
6 Germany (GER)1337
Totals (6 entries)24242472
Source: [1]

Example2

[edit]
{{Medals table
 | caption        = 2015 Winter Universiade medal table
 | host           = SVK
 | source         = <ref>{{Cite web |title=Info System:         Medals / Medal Tally |url=http://wuni15.sportresult.com/HIDE/en/MedalTally?sport=00&medalKind=DefaultSports |url-status=dead |archive-url=http://web.archive.org/web/20230225120927/http://wuni15.sportresult.com/HIDE/en/MedalTally?sport=00&medalKind=DefaultSports |archive-date=2023-02-25 |access-date=2025-09-25 |website=wuni15.sportresult.com}}</ref>
 | flag_template  = flag IOC 2
 | event          = 2015 Winter Universiade
 | team           = 
 | gold_RUS = 9 | silver_RUS = 9 | bronze_RUS = 9
 | gold_KOR = 5 | silver_KOR = 5 | bronze_KOR = 5
 | gold_ITA = 4 | silver_ITA = 4 | bronze_ITA = 4 
 | gold_1   = 1 | silver_1   = 1 | bronze_1   = 0 | name_1 = Independent Athletes | skip_1 = yes | note_1 = <ref>this is a note</ref>
 | gold_SVK = 0 | silver_SVK = 0 | bronze_SVK = 1 | host_SVK = yes
}}

  *   Host nation (Slovakia)

2015 Winter Universiade medal table
RankNationGoldSilverBronzeTotal
1 Russia99927
2 South Korea55515
3 Italy44412
Independent Athletes[2]1102
4 Slovakia*0011
Totals (4 entries)19191957
Source: [3]

References

[edit]
  1. "Info System: Medals / Medal Tally". wuni15.sportresult.com. Archived from the original on 2023-02-25. Retrieved 2025-09-25.
  2. this is a note
  3. "Info System: Medals / Medal Tally". wuni15.sportresult.com. Archived from the original on 2023-02-25. Retrieved 2025-09-25.

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Medals table in articles based on its TemplateData.

TemplateData for Medals table