Difference between revisions of "Template:IOC medals"

From blackwiki
Jump to navigation Jump to search
imported>DocWatson42
(Changed spaced em dashes to I spaced em dashes.)
imported>Trappist the monk
m (→‎top: support hyphenated parameter names)
 
Line 10: Line 10:
 
|work=Olympic.org
 
|work=Olympic.org
 
|publisher=International Olympic Committee
 
|publisher=International Olympic Committee
|accessdate={{{accessdate|}}}
+
|access-date={{{access-date|{{{accessdate|}}}}}}
 
|url=https://www.olympic.org{{#if:{{{NOC|}}}
 
|url=https://www.olympic.org{{#if:{{{NOC|}}}
 
   |/{{#switch:{{{NOC}}}
 
   |/{{#switch:{{{NOC}}}

Latest revision as of 17:26, 29 January 2021

"Results and Medalists". Olympic.org. International Olympic Committee.

Template documentation[view] [edit] [history] [purge]

Usage

{{IOC medals|games=|NOC=|sport=|accessdate=}}

The former functionality was

Generates a reference (using {{cite web}}) to the International Olympic Committee's medal database on the Olympic.org website. Based on the parameters chosen, renders a link to the search results page with the selected subset of medalists.

All parameters are individually optional, although at least one is required, and multiple specified parameters will yield a more precise database search.

The current lesser functionality simply links to a base page from which results may be accessible:

  • If NOC is specified, to the NOC base page
  • Otherwise
    • If sport is specified but not games, to the sport base page
    • If games is specified but not sport, to the games base page (same as {{IOC games}})
    • If sport and games are both specified , to the sport page for that games

Parameters

  • games – specifies the Games of interest, such as "games=2008 Summer" or "games=2006 Winter", or "games=2008 Summer Olympics" or "games=2006 Winter Olympics" (provided so that IOC medals can be used in main Olympic pages.
  • NOCIOC country code for the National Olympic Committee of interest
  • sport – name of the sport of interest. The following strings are recognized:

Examples