Template:World Athletics/doc
![]() | This is a documentation subpage for Template:World Athletics. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | This template is used on approximately 14,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
![](http://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Wikidata-logo-without-paddings.svg/30px-Wikidata-logo-without-paddings.svg.png)
![]() | This template uses Lua: |
Template:World Athletics displays an external link to an athlete's profile at the official website of World Athletics, the international governing body for the sport of athletics. It was formerly known as the International Association of Athletics Federations (IAAF). The template is intended for use in the external links section of an article.
Usage
[edit]- Unnamed parameters
{{World Athletics | ID }}
{{World Athletics | ID | NAME }}
- Named parameters
{{World Athletics | id= ID }}
{{World Athletics | id= ID | name= NAME }}
- Using Wikidata property
{{World Athletics}}
{{World Athletics | name= NAME }}
- Using nocat parameter
- The additional parameter
| nocat=y
may be added to exclude the page from tracking categories. For example, on the article for the year 1947, the following code could be used so that a reference to Amos Biwott's date of birth could be used without causing an alert because the Wikidata item for the page 1947 doesn't have a World Athletics identifier: {{World Athletics | 14354711 | Amos Biwott | nocat= y }}
{{World Athletics | id= 14354711 | name= Amos Biwott | nocat= y }}
Simplified usage with Wikidata
[edit]The two pieces of information in this template can be automatically populated.
- The id can be fed automatically from Wikidata if the ID field is left empty.
- If a World Athletics ID has not yet been added to the athlete's Wikidata: Click "WikiData Item" under Tools on the left menu. Under "Statements" on the Wikidata page click add and type in World Athletics ID. Enter the ID and save. This ID can now be automatically used across all Wikipedia's languages.
- After the World Athletics ID has been added to the athlete's Wikidata, placing
{{World Athletics}}
in the athlete's Wikipedia article will generate the link successfully.
- The name will be automatically generated from the page title. Any disambiguation handles (e.g. Michael Johnson (sprinter)) will be stripped from the name automatically.
How to find the ID
[edit]To find an athlete's World Athletics profile and ID:
- Go to https://worldathletics.org/athletes
- Find the athlete using the web page navigation (name and/or country).
- The URL of the athlete's profile will look something like this:
https://worldathletics.org/athletes/united-states/carl-lewis-14244008
- The number at the end of the URL is the ID (in this case, 14244008)
- Edit the article and insert the following text (assuming you are adding the link to the External links section):
* {{World Athletics|14244008}}
* {{World Athletics|id=14244008}}
- The template will also accept the full ID which includes the athlete's country and name:
https://worldathletics.org/athletes/united-states/carl-lewis-14244008
* {{World Athletics|united-states/carl-lewis-14244008}}
* {{World Athletics|id=united-states/carl-lewis-14244008}}
- Before saving the page, it is always a good idea to double check if the link you've created is correct by clicking on it.
Examples
[edit]Unnamed parameters
[edit]- Usage
* {{World Athletics | 14244008 | Carl Lewis }}
* {{World Athletics | united-states/carl-lewis-14244008 | Carl Lewis }}
- Output
- URLs in template
- https://worldathletics.org/athletes/-/14244008 (does not redirect to full URL)
- https://worldathletics.org/athletes/united-states/carl-lewis-14244008 (full URL)
- Other URLs
- https://www.worldathletics.org/athletes/athlete=14244008 (redirects to full URL with country and name)
- https://www.worldathletics.org/athletes/biographies?athcode=14244008 (redirects to full URL)
- https://www.worldathletics.org/athletes/biographies/athcode=14244008 (archive)
Named parameters
[edit]- Usage
* {{World Athletics |id= 14344125 |name= Klaus Thiele }}
* {{World Athletics |id= germany/klaus-thiele-14344125 |name= Klaus Thiele }}
- Output
- URLs in template
- https://worldathletics.org/athletes/-/14344125 (does not redirect to full URL)
- https://worldathletics.org/athletes/germany/klaus-thiele-14344125 (full URL)
- Other URLs
- https://www.worldathletics.org/athletes/athlete=14344125 (does not work for this ID)
- https://www.worldathletics.org/athletes/biographies?athcode=14344125 (does not work for this ID)
- https://www.worldathletics.org/athletes/biographies/athcode=14344125 (does not work for this ID)
No parameters and Wikidata property not defined
[edit]- Usage
{{World Athletics}}
- Output
- {{World Athletics}} template missing ID and not present in Wikidata.
TemplateData
[edit]TemplateData for World Athletics
This template displays an external link to an athlete's profile at the official website of World Athletics, the international governing body for the sport of athletics. It was formerly known as the International Association of Athletics Federations (IAAF). The template is intended for use in the external links section of an article.
Parameter | Description | Type | Status | |
---|---|---|---|---|
id | id 1 | The ID portion of the URL, such as 14244008 or united-states/carl-lewis-14244008 in https://worldathletics.org/athletes/united-states/carl-lewis-14244008. This parameter is optional if Wikidata property P1146 exists, but required if not.
| String | optional |
name | name 2 | The link text, which should be the name of the athlete. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(athlete)".
| String | optional |
nocat | nocat | This parameter should only be used in cases where the target of the template link is not the subject of the article. The additional parameter | nocat=y may be added to exclude the page from tracking categories. For example, on the article for the year [[1947]], the following code could be used so that a reference to [[Amos Biwott]]'s date of birth could be used without causing an alert because the Wikidata item for the page [[1947]] doesn't have a World Athletics identifier: {{World Athletics|14354711|Amos Biwott|nocat=y}} | String | optional |
Tracking categories
[edit]- template with ID
- ID is converted to numeric value before comparison with Wikidata
- united-states/carl-lewis-14244008 → 14244008
- 14244008 → 14244008
- Category:World Athletics template with ID different from Wikidata (0)
- Category:World Athletics template with ID not in Wikidata (12)
- template missing ID
See also
[edit]- {{European Athletics}}
- {{Tilastopaja}}
- {{TFRRS}}
- {{Brinkster}}
See also
[edit]