Difference between revisions of "Template:Infobox Olympic event"
Jump to navigation
Jump to search
imported>J.delanoy m (Reverted edits by 72.154.154.221 (talk) to last version by Andrwsc) |
imported>Andrwsc (output singular "nation" if parameter value equals 1) |
||
| Line 59: | Line 59: | ||
-->{{#if:{{{dates|}}}|<tr><th>Dates</th><td>{{{dates}}}</td></tr>}}<!-- | -->{{#if:{{{dates|}}}|<tr><th>Dates</th><td>{{{dates}}}</td></tr>}}<!-- | ||
-->{{#if:{{{date|}}}|<tr><th>Date</th><td>{{{date}}}</td></tr>}}<!-- | -->{{#if:{{{date|}}}|<tr><th>Date</th><td>{{{date}}}</td></tr>}}<!-- | ||
| − | -->{{#if:{{{competitors|}}}|<tr><th>Competitors</th><td>{{{competitors}}}{{#if:{{{nations|}}}| from {{{nations}}} nations}}</td></tr>}}<!-- | + | -->{{#if:{{{competitors|}}}|<tr><th>Competitors</th><td>{{{competitors}}}{{#if:{{{nations|}}}| from {{{nations}}} {{#ifeq:{{{nations}}}|1|nation|nations}}}}</td></tr>}}<!-- |
-->{{#if:{{{teams|}}}|<tr><th>Teams</th><td>{{{teams}}}</td></tr>}}<!-- | -->{{#if:{{{teams|}}}|<tr><th>Teams</th><td>{{{teams}}}</td></tr>}}<!-- | ||
-->{{#if:{{{win_value|}}}|<tr><th>{{{win_label|Winning time}}}</th><td>{{{win_value}}}</td></tr>}}<!-- | -->{{#if:{{{win_value|}}}|<tr><th>{{{win_label|Winning time}}}</th><td>{{{win_value}}}</td></tr>}}<!-- | ||
| Line 65: | Line 65: | ||
<tr><th colspan="2" style="border-top:1px solid #aaa;">Medalists</th></tr> | <tr><th colspan="2" style="border-top:1px solid #aaa;">Medalists</th></tr> | ||
<tr><td colspan="2"><table style="background-color:#f9f9f9;"><!-- | <tr><td colspan="2"><table style="background-color:#f9f9f9;"><!-- | ||
| − | -->{{#if:{{{gold|}}}|<tr valign="top"><td>[[ | + | -->{{#if:{{{gold|}}}|<tr valign="top"><td>[[File:Gold medal icon.svg|14px|Gold medal]] </td><td class="nowraplinks">{{{gold}}}{{#if:{{{goldNOC|}}}|{{#if:{{{longnames|}}}|<br/>|</td><td> }}{{flagIOC|{{{goldNOC}}}|{{{games|}}}}}}}</td></tr>}}<!-- |
| − | -->{{#if:{{{gold2|}}}|<tr valign="top"><td>[[ | + | -->{{#if:{{{gold2|}}}|<tr valign="top"><td>[[File:Gold medal icon.svg|14px|Gold medal]] </td><td class="nowraplinks">{{{gold2}}}{{#if:{{{goldNOC2|}}}|{{#if:{{{longnames|}}}|<br/>|</td><td> }}{{flagIOC|{{{goldNOC2}}}|{{{games|}}}}}}}</td></tr>}}<!-- |
| − | -->{{#if:{{{gold3|}}}|<tr valign="top"><td>[[ | + | -->{{#if:{{{gold3|}}}|<tr valign="top"><td>[[File:Gold medal icon.svg|14px|Gold medal]] </td><td class="nowraplinks">{{{gold3}}}{{#if:{{{goldNOC3|}}}|{{#if:{{{longnames|}}}|<br/>|</td><td> }}{{flagIOC|{{{goldNOC3}}}|{{{games|}}}}}}}</td></tr>}}<!-- |
| − | -->{{#if:{{{silver|}}}|<tr valign="top"><td>[[ | + | -->{{#if:{{{silver|}}}|<tr valign="top"><td>[[File:Silver medal icon.svg|14px|Silver medal]] </td><td class="nowraplinks">{{{silver}}}{{#if:{{{silverNOC|}}}|{{#if:{{{longnames|}}}|<br/>|</td><td> }}{{flagIOC|{{{silverNOC}}}|{{{games|}}}}}}}</td></tr>}}<!-- |
| − | -->{{#if:{{{silver2|}}}|<tr valign="top"><td>[[ | + | -->{{#if:{{{silver2|}}}|<tr valign="top"><td>[[File:Silver medal icon.svg|14px|Silver medal]] </td><td class="nowraplinks">{{{silver2}}}{{#if:{{{silverNOC2|}}}|{{#if:{{{longnames|}}}|<br/>|</td><td> }}{{flagIOC|{{{silverNOC2}}}|{{{games|}}}}}}}</td></tr>}}<!-- |
| − | -->{{#if:{{{silver3|}}}|<tr valign="top"><td>[[ | + | -->{{#if:{{{silver3|}}}|<tr valign="top"><td>[[File:Silver medal icon.svg|14px|Silver medal]] </td><td class="nowraplinks">{{{silver3}}}{{#if:{{{silverNOC3|}}}|{{#if:{{{longnames|}}}|<br/>|</td><td> }}{{flagIOC|{{{silverNOC3}}}|{{{games|}}}}}}}</td></tr>}}<!-- |
| − | -->{{#if:{{{bronze|}}}|<tr valign="top"><td>[[ | + | -->{{#if:{{{bronze|}}}|<tr valign="top"><td>[[File:Bronze medal icon.svg|14px|Bronze medal]] </td><td class="nowraplinks">{{{bronze}}}{{#if:{{{bronzeNOC|}}}|{{#if:{{{longnames|}}}|<br/>|</td><td> }}{{flagIOC|{{{bronzeNOC}}}|{{{games|}}}}}}}</td></tr>}}<!-- |
| − | -->{{#if:{{{bronze2|}}}|<tr valign="top"><td>[[ | + | -->{{#if:{{{bronze2|}}}|<tr valign="top"><td>[[File:Bronze medal icon.svg|14px|Bronze medal]] </td><td class="nowraplinks">{{{bronze2}}}{{#if:{{{bronzeNOC2|}}}|{{#if:{{{longnames|}}}|<br/>|</td><td> }}{{flagIOC|{{{bronzeNOC2}}}|{{{games|}}}}}}}</td></tr>}}<!-- |
| − | -->{{#if:{{{bronze3|}}}|<tr valign="top"><td>[[ | + | -->{{#if:{{{bronze3|}}}|<tr valign="top"><td>[[File:Bronze medal icon.svg|14px|Bronze medal]] </td><td class="nowraplinks">{{{bronze3}}}{{#if:{{{bronzeNOC3|}}}|{{#if:{{{longnames|}}}|<br/>|</td><td> }}{{flagIOC|{{{bronzeNOC3}}}|{{{games|}}}}}}}</td></tr>}}<!-- |
--></table></td></tr>}}<!-- | --></table></td></tr>}}<!-- | ||
-->{{#if:{{{prev|}}}{{{next|}}}|<tr><td align="left" style="border-top:1px solid #aaa; padding:0.2em;">{{#if:{{{prev|}}}|«{{{prev}}}| }}</td><td align="right" style="border-top:1px solid #aaa; padding:0.2em;">{{#if:{{{next|}}}|{{{next}}}»| }}</td></tr>}}<!-- | -->{{#if:{{{prev|}}}{{{next|}}}|<tr><td align="left" style="border-top:1px solid #aaa; padding:0.2em;">{{#if:{{{prev|}}}|«{{{prev}}}| }}</td><td align="right" style="border-top:1px solid #aaa; padding:0.2em;">{{#if:{{{next|}}}|{{{next}}}»| }}</td></tr>}}<!-- | ||
--></table><noinclude>{{documentation}}</noinclude> | --></table><noinclude>{{documentation}}</noinclude> | ||
Revision as of 17:57, 9 September 2009
| {{{event}}} at the Games of the Olympiad |
| This template uses Lua: |
Usage
Template:Parameter names example
{{Infobox Olympic event
| event =
| games =
| image =
| caption =
| venue = <!-- or: venues -->
| date = <!-- or: dates, use {{Start date|YYYY|MM|DD}} -->
| num_events =
| competitors =
| nations =
| teams =
| win_value =
| gold =
| goldNOC =
| gold2 =
| goldNOC2 =
| gold3 =
| goldNOC3 =
| silver =
| silverNOC =
| silver2 =
| silverNOC2 =
| silver3 =
| silverNOC3 =
| bronze =
| bronzeNOC =
| bronze2 =
| bronzeNOC2 =
| bronze3 =
| bronzeNOC3 =
| prev =
| next =
}}
Parameters
- event
- Required for infobox title
- games
- String such as
2008 Summeror2006 Winter, for example - image
- (Optional) image filename only
- image_size
- (Optional) defaults to 220px
- alt
- (Optional) alt text, see WP:MOSALT for more
- caption
- (Optional) displays under the image
- venue or venues
- Required
- num_events
- (Optional) total number of competitions for one "event" such as Alpine skiing
- date or dates
- Required, date(s) of the competition. Use {{Start date}} (and {{End date}}) for the first (and last), over multiple lines if necessary.
- competitors
- (Optional) total number of competitors for individual events
- nations
- (Optional) total number of unique nations represented in this event
- teams
- (Optional) number of teams in the tournament for team sports
- win_value
- (Optional) winning time or score. Use
win_label = Winning scoreto change the label from Winning time to Winning score, for example. - gold, silver, bronze
- Athlete name or team name. Use
gold = {{flagIOCteam|CHN|2008 Summer}}(for example) for a team name, instead of giving a full list of athletes. For duos and small teams, separate entries with {{Plainlist}} - goldNOC, silverNOC, bronzeNOC
- (Optional) country code for the gold medal winner. Do not specify this if the
goldparameter specifies a team name instead of an individual name. - gold2 and goldNOC2
- As for
goldandgoldNOC, but used for situations where there is a tie for first place and two gold medals are awarded (The template currently supports up to three of each medal type.). - prev
- Link to article on the same event/sport from the previous edition of the Olympic Games
- next
- Link to article on the same event/sport from the following edition of the Olympic Games
Example
| Men's 400 metre individual medley at the Games of the XXIX Olympiad | ||||||||||
| Michael Phelps Ryan Lochte Laszlo Cseh medals 2008 Olympics.jpg Medal winners | ||||||||||
| Venue | Beijing National Aquatics Center | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Dates | August 9, 2008 (heats) August 10, 2008 (final) | |||||||||
| Competitors | 29 from 22 nations | |||||||||
| Medalists | ||||||||||
| ||||||||||
| «2004 | 2012» | |||||||||
{{Infobox Olympic event
| event = Men's 400 metre individual medley
| games = 2008 Summer
| image = Michael Phelps Ryan Lochte Laszlo Cseh medals 2008 Olympics.jpg
| image_size = 240px
| caption = Medal winners
| venue = [[Beijing National Aquatics Center]]
| dates = {{Start date|2008|08|09}} (heats)<br/>{{End date|2008|08|10}} (final)
| competitors = 29
| nations = 22
| gold = [[Michael Phelps]]
| goldNOC = USA
| silver = [[László Cseh]]
| silverNOC = HUN
| bronze = [[Ryan Lochte]]
| bronzeNOC = USA
| prev = [[Swimming at the 2004 Summer Olympics – Men's 400 metre individual medley|2004]]
| next = [[Swimming at the 2012 Summer Olympics – Men's 400 metre individual medley|2012]]
}}
Microformat
Tracking categories
- Category:Pages using infobox Olympic event with unknown parameters (0)
- Category:Pages using Infobox Olympic event with invalid games text (0)
- Category:Infobox Olympic event using medalist parameter without NOC parameter (0)
See also
- Supporting template
- Similar templates
- Template:Infobox Paralympic event
- Template:Infobox sports competition event
- Template:Infobox Asian Games event
- Template:Infobox Commonwealth Games event
- Template:Infobox Pan American Games event
- Template:Infobox Southeast Asian Games event
| The above documentation is transcluded from Template:Infobox Olympic event/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |