Template:Swimrankings: Difference between revisions
allow for named or unnamed parameters, update to trim spaces from id parameter, remove disambiguation if {{PAGENAME}} is used, and add documentation |
PAGENAMEBASE |
||
Line 1: | Line 1: | ||
[http://www.swimrankings.net/index.php?page=athleteDetail&athleteId={{Trim|{{{1|{{{id}}}}}}}} {{#if:{{{2|{{{name<includeonly>|</includeonly>}}}}}}|{{{2|{{{name}}}}}}|{{ |
[http://www.swimrankings.net/index.php?page=athleteDetail&athleteId={{Trim|{{{1|{{{id}}}}}}}} {{#if:{{{2|{{{name<includeonly>|</includeonly>}}}}}}|{{{2|{{{name}}}}}}|{{PAGENAMEBASE}}}}] at ''Swimrankings.net''<noinclude> |
||
{{Documentation}} |
{{Documentation}} |
||
<!-- Please add categories to the /doc subpage & add interwikis to Wikidata. --> |
<!-- Please add categories to the /doc subpage & add interwikis to Wikidata. --> |
Revision as of 21:19, 15 November 2014
{{{name}}} at Swimrankings.net
This template uses Lua: |
Template:Swimrankings displays an external link to a swimmer's profile at Swimrankings.net, a website which displays results and data based on information from the European Swimming Federation (Ligue Européenne de Natation or LEN) and the following national swimming federations: Belgium, Canada, Netherlands, Faroe Islands, Poland, Portugal, Slovakia, and Switzerland. It is intended for use in the external links section of an article.
Usage
- Unnamed parameters
{{Swimrankings | ID }}
{{Swimrankings | ID | NAME }}
- Named parameters
{{Swimrankings | id= ID }}
{{Swimrankings | id= ID | name= NAME }}
- Using Wikidata property
{{Swimrankings}}
{{Swimrankings | name= NAME }}
Examples
Unnamed parameters
- Usage
* {{Swimrankings | 4042220 | Janne Schaefer }}
- Output
-
- Janne Schaefer at Swimrankings.net
Named parameters
- Usage
* {{Swimrankings | id= 4065665 | name= Janina-Kristin Goetz }}
- Output
-
- Janina-Kristin Goetz at Swimrankings.net
No parameters and Wikidata property not defined
- Usage
* {{Swimrankings}}
- Output
-
- Swimrankings at Swimrankings.net
TemplateData
TemplateData for Swimrankings
This template displays an external link to a swimmer's profile at Swimrankings.net, a website which displays results and data based on information from the European Swimming Federation (Ligue Européenne de Natation or LEN) and the following national swimming federations: Belgium, Canada, Netherlands, Faroe Islands, Poland, Portugal, Slovakia, and Switzerland. It is intended for use in the external links section of an article.
Parameter | Description | Type | Status | |
---|---|---|---|---|
id | id 1 | The ID number in the URL, such as 4042220 in https://www.swimrankings.net/index.php?page=athleteDetail&athleteId=4042220. This parameter is optional if Wikidata property P2640 exists, but required if not.
| Number | optional |
name | name 2 | The link text, which should be the name of the swimmer. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(swimmer)".
| String | optional |
Tracking categories
- Category:Swimrankings template with ID different from Wikidata (0)
- Category:Swimrankings template with ID not in Wikidata (0)
- Category:Swimrankings template missing ID and not in Wikidata (0)