Difference between revisions of "Template:FlagATHCHathlete"
Jump to navigation
Jump to search
imported>Primefac (Reverted good faith edits by Sillyfolkboy (talk): Rolling back until "what's gone wrong" can be sorted out. (TW)) |
imported>Sillyfolkboy (Undid revision 832358525 by Primefac (talk) - additional handling now added to Template:IAAFAlias and Module:Country alias - restoring to confirm all test cases fixes) |
||
| Line 1: | Line 1: | ||
| − | {{#if:{{{2|}}}|{{ | + | {{#if:{{{2|}}}|[[Image:{{country alias|{{IAAFAlias|{{{2}}}}}|flag=yes|fullName={{#invoke:StripToNumbers|main|{{{3|{{PAGENAME}}}}}}}}}|22x20px|border|alt=|link=]]|{{no flag}}}} {{{1}}}{{#if:{{{2|}}}| <span style="font-size:90%;">([[{{getalias|{{{2}}}|shortname}} at the {{#if:{{{3|}}}|{{{3|}}} Championships in Athletics|{{#ifeq:{{#invoke:String|find|{{PAGENAME}}|–}}|0|{{PAGENAME}}|{{#invoke:String|sub|{{PAGENAME}}|1|{{#expr:{{#invoke:String|find|{{PAGENAME}}|–}} - 2}}}}}}}}|{{{2}}}]])</span>}}<noinclude> |
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 19:30, 25 March 2018
Template:No flag {{{1}}}
The FlagATHCHathlete template is designed to provide relevant links to the "Nation at Championships" style sub-articles when listing that nation's athletes on athletics championships pages.
Usage
The template has four input fields:
{{FlagATHCHathlete|Athlete name|Country code|Edition|Flag variant}}
- The Athlete name can be entered as plain text or bracketed linked text as required (e.g. Carl Lewis or Carl Lewis)
- The Country code is the three letter country code used to refer to the nation in international competitions (e.g. Afghanistan = AFG)
- The Edition field relates to which version of the competition needs to be linked (e.g. "2013 World" will link to "2013 World Championships in Athletics"). Leaving this field intentionally blank will automatically use the current page name to create the link.
- The Flag variant allows for when a country has changed their flag over the course of their competing at the athletics championships. For example, using "SFR" here with the country code YUG (Yugoslavia) will produce a flag and nation name for the Socialist Federal Republic of Yugoslavia.
Examples
*{{FlagATHCHathlete|[[Masoud Azizi]]|AFG|2013 World}}
*{{FlagATHCHathlete|[[Dwight Phillips]]|USA|2009 World}}
Blank edition field
- When using a blank edition field on a template used on the 2011 World Championships in Athletics page:
*{{FlagATHCHathlete|[[Dwight Phillips]]|USA}}
See also
- Template:Flaglinkmedalist a similar template which links to nation articles but shows full country name
- Template:Flaglinkteam a similar template designed for nations instead of athletes
- Template:MedalistTable a template for medal summaries to be used in conjunction with this template
- Template:AthleticsLink an athletics medal summary table template to auto-generate event article links
| 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}} | |||
| The above documentation is transcluded from Template:FlagATHCHathlete/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |