Template talk:OlympicEventRow

From Wikipedia, the free encyclopedia

Contents

[edit] Usage

This template is designed to be used on Olympic-related tables, possessing an {{OlympicYearHeader}}-derived header, which display the historical evolution of events of a specific sport at the Summer or Winter Olympics. It creates an unique table row where the event name and the years it featured on the Olympic programme can be input as parameter values, saving time and preventing complicated table formating problems.

The template code is developed so that:

  1. Cells corresponding to a sport's Olympic non-competing years appear shaded in gray;
  2. Cells corresponding to years where an event was not part of the sport's programme appear blanked;

[edit] Wiki markup

{{OlympicEventRow
 |event= 
 |sport=
 |season=
 |1896=
 |1900=
 |1904=
 |1908=
 |1912=
 ...
 |1992=
 |1994=
 |1996=
 |1998=
 |2000=
 |2002=
 |2004=
 |2006=
 |total=
}}

[edit] Parameters

event
required - official name of the event; if not specified, default is Total which can be used as the final row to sum all the events of a sport at a given Olympiad
sport
required - capitalized Olympic sport for which the table is built (e.g. Archery)
season
required - string which should be either "Summer" or "Winter", according to the Games where <sport> is included on the official programme.
<year>
optional - if event was contested insert {{Bigbullet}} which displays a ""; if not specified, default is a blank cell
total
total number of Olympic Games where the event featured within <sport>; if not specified, default is a blank cell

[edit] Demonstration

{| {{OlympicYearHeader|sport=Diving}}
|-
{{OlympicEventRow|event=Men's synchronized 3 m springboard|season=Summer|sport=Diving
|2000={{Bigbullet}} 
|2004={{Bigbullet}} 
|total=2
}}
|}
Event 96 00 04 08 12 20 24 28 32 36 48 52 56 60 64 68 72 76 80 84 88 92 96 00 04 Years
Men's synchronized 3 m springboard     2

[edit] #ifexist limit

This template makes 29 calls to #ifexist and is used many times per page. As a result, many pages are going to be annhilated by the pending limit on calls to #ifexist. Please rewrite it to make far fewer calls to #ifexist. Dragons flight 23:13, 2 December 2007 (UTC)