Template:Flag IOC/sandbox: Difference between revisions
m (Robertsky moved page Template:FlagIOC/sandbox to Template:Flag IOC/sandbox: Requested by HouseBlaster at WP:RM/TR: expand template name per WP:TPN) |
(No difference)
|
Revision as of 02:35, 21 May 2024
This is the template sandbox page for Template:Flag IOC (diff). See also the companion subpage for test cases. |
This template is used on many pages. To avoid large-scale disruption and unnecessary server load, any changes to this template should first be tested in its /sandbox or /testcases subpages or in your own user subpage. The tested changes can then be added to this page in one single edit. Please consider discussing any changes on the talk page before implementing them. |
Uses Lua: |
This template family is used to display a small flag and name of a country, with a wikilink to the country's page for the specified multi-sport event.
Use TFlag IOC/sandbox for the other games not listed below.
Usage
{{flagXXX|code|games|athletes}}
- code is the three-letter country code used by the IOC, CGF, or FINA.
- games is a string with slightly different forms depending on the template used:
- Tflag IOC 2 takes values in the form
<year> <games>
, or just<games>
- Tflag IOC and Tflag IPC use
<year> Summer
,<year> Winter
, or justSummer
orWinter
- Games-specific templates such as Tflag CGF, Tflag PASO, etc, simply take the
<year>
. See below for a full list of supported "shortcut" templates
- Tflag IOC 2 takes values in the form
- The intent is that this template can be used from medal tables and event result tables to point to the right country page. Also, the correct historical flag is chosen based on this string, for countries that had different flags in the past.
- athletes is the number of athletes that the nation contributed to the specific Games. It is an optional argument, and will render a small (#) after the nation's name.
Examples
In addition to using historical flags when appropriate, the specific name of the games will be selected when appropriate.
flag IOC 2
{{flag IOC 2|CHN|Asian Games}}
→ Script error: No such module "Country alias".{{flag IOC 2|CHN|2008 Asian Beach Games}}
→ Script error: No such module "Country alias".{{flag IOC 2|HKG|1954 Asian Games}}
→ Script error: No such module "Country alias". (uses historical flag){{flag IOC 2|JPN|2009 Asian Indoor Games|100}}
→ Script error: No such module "Country alias".
flag IOC / flag IPC
{{flag IOC|USA}}
→ Script error: No such module "Country alias".{{flag IOC|GER|Winter}}
→ Script error: No such module "Country alias".{{flag IOC|ESP|2004 Summer}}
→ Script error: No such module "Country alias".{{flag IOC|CAN|2006 Winter}}
→ Script error: No such module "Country alias".{{flag IOC|CAN|1924 Winter}}
→ Script error: No such module "Country alias". (uses historical flag){{flag IOC|GRE|2004 Summer|441}}
→ Script error: No such module "Country alias".{{flag IPC|GRE|2004 Summer|441}}
→ Script error: No such module "Country alias".
flag CGF
{{flag CGF|CAN}}
→ Script error: No such module "Country alias".{{flag CGF|MAS|2006}}
→ Script error: No such module "Country alias".{{flag CGF|AUS|1974}}
→ Script error: No such module "Country alias".{{flag CGF|NZL|1962}}
→ Script error: No such module "Country alias".{{flag CGF|IND|1934}}
→ Script error: No such module "Country alias".{{flag CGF|SCO|2010|191}}
→ Script error: No such module "Country alias".
flag SEAGF
{{flag SEAGF|VIE|1973}}
→ Script error: No such module "Country alias". (uses historical flag){{flag SEAGF|MAS|1961}}
→ Script error: No such module "Country alias".{{flag SEAGF|MYA|2013}}
→ Script error: No such module "Country alias".{{flag SEAGF|VIE|2015|400}}
→ Script error: No such module "Country alias".
Others
{{flag OCA|CHN}}
→ Script error: No such module "Country alias".{{flag OCA|CHN|2010}}
→ Script error: No such module "Country alias".{{Flag PASO|COL|2011}}
→ Script error: No such module "Country alias".{{Flag PASO|BRA|2011|590}}
→ Script error: No such module "Country alias".{{flag CAC|MEX|2010}}
→ Script error: No such module "Country alias".{{flag IWGA|JPN|2017}}
→ Script error: No such module "Country alias".{{flag EOC|ISR|2015}}
→ Script error: No such module "Country alias".{{flag AFOC|EGY|2015}}
→ Script error: No such module "Country alias".{{flag CIJM|ITA|2018}}
→ Script error: No such module "Country alias".{{flag FISU|FRA|2019}}
→ Script error: No such module "Country alias".
Supporting templates
- The country name is supplied by {{country alias|AAA}} where AAA is an IOC country code.
- The flag image name is also supplied by
{{country alias}}
- For the complete country code list with related names and flags, see Module:Country alias
Alternatives to avoid Wikipedia's Post-expand include size limit
Pages with many flag icons may come close to or exceed Wikipedia's Post-expand include size limit. In these cases consider {{#invoke:flag|IOC}}/{{#invoke:flag|IOC 2}} instead. For basic use, {{flag IOC|country|games}}
can be replaced with {{#invoke:flag|IOC|country|games}}
.
See also
Output style → | Country name | Country name (code) | Athlete (country code) | Athlete Country Name | Country code |
---|---|---|---|---|---|
Olympic Games | {{Flag IOC}} | {{Flag IOC team}} | {{Flag IOC athlete}} | {{Flag IOC medalist}} | {{Flag IOC short}} |
Other games | {{Flag IOC 2}} | {{Flag IOC 2 team}} | {{Flag IOC 2 athlete}} | {{Flag IOC 2 medalist}} | {{Flag IOC 2 short}} |
Paralympic Games | {{Flag IPC}} | {{Flag IPC team}} | {{Flag IPC athlete}} | {{Flag IPC medalist}} | {{Flag IPC short}} |
Pan American | {{Flag PASO}} | {{Flag PASO team}} | {{Flag PASO athlete}} | {{Flag PASO medalist}} | |
Parapan American | {{Flag PPASO}} | ||||
Commonwealth | {{Flag CGF}} | {{Flag CGF team}} | {{Flag CGF athlete}} | {{Flag CGF medalist}} | |
Southeast Asian | {{Flag SEAGF}} | {{Flag SEAGF team}} | {{Flag SEAGF athlete}} | {{Flag SEAGF medalist}} | |
World Games | {{Flag IWGA}} | ||||
Central American and Caribbean Games | {{Flag CAC}} | ||||
Asian Games | {{Flag OCA}} | ||||
European Games | {{Flag EOC}} | ||||
African Games | {{Flag AFOC}} | ||||
Mediterranean Games | {{Flag CIJM}} | ||||
Summer Universiade | {{Flag FISU}} | ||||
"Nation at Championships"-style | {{Flag link team}} | ||||
Generic | TFlag | {{Flag team}} | {{Flag athlete}} | {{Flag medalist}} | |
Generic (variant) | {{Flag link}} | {{Flag link athlete}} | {{Flag link medalist}} |