Jump to content

Template:Olympic events sidebar/doc

From Wikipedia, the free encyclopedia

{{Olympic events sidebar}} is a base template for a series of navigational sidebars for articles on Olympic disciplines, designed to replace the aged Summer Olympics by year and Winter Olympics by year navigational sidebar series. The base template offers a simple, modern design that mimics the style of {{Infobox Olympic event}}, the infobox template in which {{Olympic events sidebar}} is designed to sit underneath. It offers a graphical representation of the Olympic discipline(s) featured, and a link to the discipline's article on Wikipedia. Its various sub-templates use {{#switch}} parser functions and collapsible lists to keep the sidebar short and not intrusive on the article's content, such as center-aligned tables and thumbnail images, while at the same time allowing just one template to be used for an entire discipline's Olympic history, rather than a separate template for each and every year the discipline was featured at an Olympics, unlike the predecessor Summer Olympics by year and Winter Olympics by year series did.

Syntax

[edit]
{{Olympic events sidebar
| sport  = 
| games  = 
| events =
}}

Parameters

[edit]
Parameter Function Description
events Presents the list of events for a specified discipline in a collapsed format. The input for the collapsed list of events of a discipline specified by the sport parameter at a games specified by the games parameter. The {{#switch}} parser function is used in the exact same way as used in the games parameter, which is {{#switch:{{{1}}}| }}. The input for the parser function is similar, but this time the input is the year followed by a formatted list of events. See the below example for more details.
games Activates wikilinks to relevant articles in the headline, harmonious with sport Sets the year of the Olympics and whether or not it is a Summer, Winter, Summer Youth, or Winter Youth Olympics. The {{#switch}} parser function is used to make this parameter work; the code {{#switch:{{{1}}}| }} is inputted to the games parameter and a combination of a year and an Olympic games type is inputted to the {{#switch}} parser function. For example, if the sub-template has a list for events at the 2012 Summer Olympics in the events parameter, input 2012 = 2012 Summer into the parser function. This allows the sub-template's input for the year and the Olympic type to be simply called by inputting the year only. See relevant sub-template documentation for further details.
sport Activates the pictogram and wikilinks to relevant articles in the headline, harmonious with games Sets the Olympic discipline featured in the sidebar. Only a very simple input of the name of the discipline as seen on Wikipedia is required for this input, such as Archery, Swimming, or Golf. Caution is encouraged when handling case-sensitive names such as Modern pentathlon and Rugby sevens.

Sub-templates

[edit]

One sport

Two sports