Difference between revisions of "Template:FlagIOCathlete/doc"

From blackwiki
Jump to navigation Jump to search
imported>GKFX
(Add templatedata)
imported>Primefac
(swap)
Line 10: Line 10:
 
'''<code><nowiki>{{</nowiki>FlagIOCathlete|''athlete''|''code''|''games''}}</code>'''
 
'''<code><nowiki>{{</nowiki>FlagIOCathlete|''athlete''|''code''|''games''}}</code>'''
  
 +
==Examples==
 +
<code><nowiki>{{flagIOCathlete | [[Mark Spitz]] | USA | 1972 Summer }}</nowiki></code>
 +
: {{flagIOCathlete | [[Mark Spitz]] | USA | 1972 Summer }}
 +
 +
<code><nowiki>{{flagIOCathlete | [[Jamie Salé]] and [[David Pelletier]] | CAN | 2002 Winter }}</nowiki></code>
 +
: {{flagIOCathlete | [[Jamie Salé]] and [[David Pelletier]] | CAN | 2002 Winter }}
 +
 +
<code><nowiki>{{flagIOCathlete | [[Nedo Nadi]] | ITA | 1920 Summer }}</nowiki></code> ''(shows historical Italian flag in use in 1920)''
 +
: {{flagIOCathlete | [[Nedo Nadi]] | ITA | 1920 Summer }}
 +
 +
For comparison, the output of <code><nowiki>{{flagIOCmedalist | [[Nedo Nadi]] | ITA | 1920 Summer }}</nowiki></code> is:
 +
: {{flagIOCmedalist | [[Nedo Nadi]] | ITA | 1920 Summer }}
 +
 +
== Supporting templates ==
 +
* The country name is supplied by {{tlx|country alias|''AAA''}} where AAA is an [[IOC country code]].
 +
* The flag image name is also supplied by {{tlc|country alias}}
 +
** For the complete country code list with related names and flags, see [[Module:Country alias]]
 +
 +
 +
==Template Data==
 
{{TemplateDataHeader}}
 
{{TemplateDataHeader}}
  
Line 43: Line 63:
  
 
Note that the combination of ''code'' and ''games'' parameters will automatically choose the correct flag for the nation (including historical flags for nations in which they have changed over the years) and the correct wikilink to the nation's article.
 
Note that the combination of ''code'' and ''games'' parameters will automatically choose the correct flag for the nation (including historical flags for nations in which they have changed over the years) and the correct wikilink to the nation's article.
 
==Examples==
 
<code><nowiki>{{flagIOCathlete | [[Mark Spitz]] | USA | 1972 Summer }}</nowiki></code>
 
: {{flagIOCathlete | [[Mark Spitz]] | USA | 1972 Summer }}
 
 
<code><nowiki>{{flagIOCathlete | [[Jamie Salé]] and [[David Pelletier]] | CAN | 2002 Winter }}</nowiki></code>
 
: {{flagIOCathlete | [[Jamie Salé]] and [[David Pelletier]] | CAN | 2002 Winter }}
 
 
<code><nowiki>{{flagIOCathlete | [[Nedo Nadi]] | ITA | 1920 Summer }}</nowiki></code> ''(shows historical Italian flag in use in 1920)''
 
: {{flagIOCathlete | [[Nedo Nadi]] | ITA | 1920 Summer }}
 
 
For comparison, the output of <code><nowiki>{{flagIOCmedalist | [[Nedo Nadi]] | ITA | 1920 Summer }}</nowiki></code> is:
 
: {{flagIOCmedalist | [[Nedo Nadi]] | ITA | 1920 Summer }}
 
 
== Supporting templates ==
 
* The country name is supplied by {{tlx|country alias|''AAA''}} where AAA is an [[IOC country code]].
 
* The flag image name is also supplied by {{tlc|country alias}}
 
** For the complete country code list with related names and flags, see [[Module:Country alias]]
 
  
 
== See also ==
 
== See also ==

Revision as of 16:35, 14 February 2018

This template is used to simplify creation of Olympic results articles. It expands upon the infrastructure developed for the {{FlagIOC}} template to render the following additions to an athlete's name:

  • flag icon for the athlete's nation before the name
  • country code for the athlete's nation after the name
  • wikilink from the country code to the appropriate "Nation at the year Olympics" article

Usage

{{FlagIOCathlete|athlete|code|games}}

Examples

{{flagIOCathlete | [[Mark Spitz]] | USA | 1972 Summer }}

 Mark Spitz (USA)

{{flagIOCathlete | [[Jamie Salé]] and [[David Pelletier]] | CAN | 2002 Winter }}

 Jamie Salé and David Pelletier (CAN)

{{flagIOCathlete | [[Nedo Nadi]] | ITA | 1920 Summer }} (shows historical Italian flag in use in 1920)

 Nedo Nadi (ITA)

For comparison, the output of {{flagIOCmedalist | [[Nedo Nadi]] | ITA | 1920 Summer }} is:

Nedo Nadi
 Italy

Supporting templates


Template Data

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for FlagIOCathlete

This template is used to simplify creation of Olympic results articles. It expands upon the infrastructure developed for the FlagIOC template to render the following additions to an athlete's name: national flag icon before, and country code after with wikilink to the appropriate "«Nation» at the «year» Olympics" article.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Athlete1

Any content string; usually one athlete wikilinked, but could be two.

Example
[[Jamie Salé]] and [[David Pelletier]]
Contentrequired
Country code2

Three letter code as per [[List of IOC country codes]].

Example
CAN
Stringrequired
Games3

String of the form "«year» Summer" or "«year» Winter". In combination with the country code, shows the historically correct flag.

Example
1920 Summer
Stringrequired

Note that the combination of code and games parameters will automatically choose the correct flag for the nation (including historical flags for nations in which they have changed over the years) and the correct wikilink to the nation's article.

See also

Output style → Country name Country (code) Athlete (country) Athlete
Country
Country code
Olympic Games {{FlagIOC}} {{FlagIOCteam}} {{FlagIOCathlete}} {{FlagIOCmedalist}} {{FlagIOCshort}}
Other games {{FlagIOC2}} {{FlagIOC2team}} {{FlagIOC2athlete}} {{FlagIOC2medalist}} {{FlagIOC2short}}
Paralympic Games {{FlagIPC}} {{FlagIPCteam}} {{FlagIPCathlete}} {{FlagIPCmedalist}} {{FlagIPCshort}}
Pan American {{FlagPASO}} {{FlagPASOteam}} {{FlagPASOathlete}} {{FlagPASOmedalist}}
Parapan American {{FlagPPASO}}
Commonwealth {{FlagCGF}} {{FlagCGFteam}} {{FlagCGFathlete}} {{FlagCGFmedalist}}
Southeast Asian {{FlagSEAGF}} {{FlagSEAGFteam}} {{FlagSEAGFathlete}} {{FlagSEAGFmedalist}}
World Games {{FlagIWGA}}
Central American and Caribbean Games {{FlagCAC}}
Asian Games {{FlagOCA}}
"Nation at Championships"-style {{Flaglinkteam}} {{FlagATHCHathlete}}
Generic {{Flag}} {{Flagteam}} {{Flagathlete}} {{Flagmedalist}}
Generic (variant) {{Flaglink}} {{Flaglinkmedalist}}