Difference between revisions of "Template:EventLink/doc"

From blackwiki
Jump to navigation Jump to search
imported>Sillyfolkboy
(create doc)
 
imported>Sillyfolkboy
(add third parameter doc)
Line 4: Line 4:
  
 
== Usage ==
 
== Usage ==
This template has two input fields:
+
This template has three input fields, two required and one optional:
:<nowiki>{{AthleticsLink|Event|Gender}}</nowiki>
+
:<nowiki>{{AthleticsLink|Event|Gender|Wind}}</nowiki>
  
 
*The '''Event''' field is for the race or competition type (e.g. 100 metres, Shot put). The text entered here will appear exactly as written in the medal table. It will also be used to generate the event's article link and handles capitalisation by making the first letter lower case. (N.B. the event must match the sub-article name - for example "3000 m s'chase" would only link to a sub-article with "3000 m s'chase" as the title)
 
*The '''Event''' field is for the race or competition type (e.g. 100 metres, Shot put). The text entered here will appear exactly as written in the medal table. It will also be used to generate the event's article link and handles capitalisation by making the first letter lower case. (N.B. the event must match the sub-article name - for example "3000 m s'chase" would only link to a sub-article with "3000 m s'chase" as the title)
  
 
*The '''Gender''' field clarifies the sex of the competition and has four possibilities: "Men", "Women", "Boy" and "Girl". It is used to generate the event's article link.
 
*The '''Gender''' field clarifies the sex of the competition and has four possibilities: "Men", "Women", "Boy" and "Girl". It is used to generate the event's article link.
 +
 +
*The '''Wind''' field is optional. To be used on sprint race links, enter the wind speed and direction to display, for example: "+2.5". If used, this information will appear between the event name and the details link
  
 
The link is generated by taking the current page name (e.g. 2013 World Championships in Athletics), the Gender (e.g. "Men"), and the Event (e.g. "100 metres") to make a link (e.g. [[2013 World Championships in Athletics – Men's 100 metres]])
 
The link is generated by taking the current page name (e.g. 2013 World Championships in Athletics), the Gender (e.g. "Men"), and the Event (e.g. "100 metres") to make a link (e.g. [[2013 World Championships in Athletics – Men's 100 metres]])
  
 
==Example==
 
==Example==
The code <nowiki>{{AthleticsLink|High jump|Women}}</nowiki> used on the page [[2001 World Championships in Athletics]] will produce the following outcome.
+
The code <nowiki>{{AthleticsLink|High jump|Women}}</nowiki> and <nowiki>{{AthleticsLink|100 metres|Men|-0.9}}</nowiki> used on the page [[2001 World Championships in Athletics]] will produce the following outcome.
  
 
{| {{MedalistTable|type=Event}}
 
{| {{MedalistTable|type=Event}}
Line 21: Line 23:
  
 
| High jump<br><span class="noprint" style="font-size:90%; font-style:italic;">[[2001 World Championships in Athletics – Women's high jump|details]]</span>
 
| High jump<br><span class="noprint" style="font-size:90%; font-style:italic;">[[2001 World Championships in Athletics – Women's high jump|details]]</span>
 +
|
 +
|
 +
|
 +
|-
 +
| 100 metres<br><small>(wind: -0.9&nbsp;m/s)</small><br><span class="noprint" style="font-size:90%; font-style:italic;">[[2001 World Championships in Athletics – Men's 100 metres|details]]</span>
 
|
 
|
 
|
 
|

Revision as of 23:24, 28 July 2016

The AthleticsLink template is designed to provide links to event level sub-articles in medal tables on athletics championships articles.

Usage

This template has three input fields, two required and one optional:

{{AthleticsLink|Event|Gender|Wind}}
  • The Event field is for the race or competition type (e.g. 100 metres, Shot put). The text entered here will appear exactly as written in the medal table. It will also be used to generate the event's article link and handles capitalisation by making the first letter lower case. (N.B. the event must match the sub-article name - for example "3000 m s'chase" would only link to a sub-article with "3000 m s'chase" as the title)
  • The Gender field clarifies the sex of the competition and has four possibilities: "Men", "Women", "Boy" and "Girl". It is used to generate the event's article link.
  • The Wind field is optional. To be used on sprint race links, enter the wind speed and direction to display, for example: "+2.5". If used, this information will appear between the event name and the details link

The link is generated by taking the current page name (e.g. 2013 World Championships in Athletics), the Gender (e.g. "Men"), and the Event (e.g. "100 metres") to make a link (e.g. 2013 World Championships in Athletics – Men's 100 metres)

Example

The code {{AthleticsLink|High jump|Women}} and {{AthleticsLink|100 metres|Men|-0.9}} used on the page 2001 World Championships in Athletics will produce the following outcome.

Event Gold Silver Bronze
High jump
details
100 metres
(wind: -0.9 m/s)
details

See also