Difference between revisions of "Template:Eliteprospects/doc"
imported>Zyxw m (fix placement of category to include template, not documentation (via JWB)) |
imported>Zyxw (update TemplateData and categories) |
||
| Line 20: | Line 20: | ||
== TemplateData == | == TemplateData == | ||
| − | {{ | + | {{TemplateData header}} |
<templatedata> | <templatedata> | ||
{ | { | ||
| Line 28: | Line 28: | ||
"label": "EliteProspects player ID", | "label": "EliteProspects player ID", | ||
"aliases": ["1"], | "aliases": ["1"], | ||
| − | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion the URL | + | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 2092 is the ID portion of http://www.eliteprospects.com/player.php?player=2092&lang=en. This parameter is optional if Wikidata property P2481 exists, but required if not.", |
"type": "number", | "type": "number", | ||
"default": "Wikidata property P2481", | "default": "Wikidata property P2481", | ||
| − | "required": | + | "required": false |
}, | }, | ||
"name": { | "name": { | ||
| − | "label": "Player name", | + | "label": "Player's name", |
"aliases": ["title","2"], | "aliases": ["title","2"], | ||
"description": "The \"name\" parameter (or \"title\" or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the player. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(ice hockey)\".", | "description": "The \"name\" parameter (or \"title\" or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the player. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(ice hockey)\".", | ||
| Line 41: | Line 41: | ||
"required": false | "required": false | ||
} | } | ||
| − | } | + | }, |
| + | "paramOrder": [ | ||
| + | "id", | ||
| + | "name" | ||
| + | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
| Line 107: | Line 111: | ||
[[Category:WikiProject Ice Hockey templates]] | [[Category:WikiProject Ice Hockey templates]] | ||
[[Category:People and person external link templates]] | [[Category:People and person external link templates]] | ||
| + | [[Category:External link templates using Wikidata]] | ||
[[Category:Templates that add a tracking category]] | [[Category:Templates that add a tracking category]] | ||
| − | |||
| − | |||
}}</includeonly> | }}</includeonly> | ||
Revision as of 12:28, 7 March 2017
| 40px | This is a documentation subpage for Template:Eliteprospects. It contains usage information, categories and other content that is not part of the original template page. |
Template:Uses Wikidata Template:Tracks Wikidata
Template:Eliteprospects displays an external link to an ice hockey player's profile at EliteProspects.com. It is intended for use in the external links section of an article.
Contents
Usage
Unnamed parameters:
{{Eliteprospects | ID }}{{Eliteprospects | ID | NAME }}
Named parameters:
{{Eliteprospects | id= ID }}{{Eliteprospects | id= ID | name= NAME }}
Using Wikidata property P2481:
{{Eliteprospects}}{{Eliteprospects | name= NAME }}
TemplateData
TemplateData for Eliteprospects
This template displays an external link to an ice hockey player's profile at EliteProspects.com. It is intended for use in the external links section of an article.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| EliteProspects player ID | id 1 | The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: 2092 is the ID portion of http://www.eliteprospects.com/player.php?player=2092&lang=en. This parameter is optional if Wikidata property P2481 exists, but required if not.
| Number | optional |
| Player's name | name title 2 | The "name" parameter (or "title" or unnamed parameter "2") may be used to specify the link text, which should be the name of the player. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(ice hockey)".
| String | optional |
Examples
Unnamed parameters
Usage:
{{Eliteprospects | 2092 | Tomi Kallio }}
Output:
- Tomi Kallio career statistics at EliteProspects.comScript error: No such module "EditAtWikidata".Template:WikidataCheck
URL:
Named parameters
- name
Usage:
{{Eliteprospects | id= 9678 | name= Wayne Gretzky }}
Output:
- Wayne Gretzky career statistics at EliteProspects.comScript error: No such module "EditAtWikidata".Template:WikidataCheck
URL:
- title
Usage:
{{Eliteprospects | id= 8627 | title= Jaromír Jágr }}
Output:
- Jaromír Jágr career statistics at EliteProspects.comScript error: No such module "EditAtWikidata".Template:WikidataCheck
URL:
No parameters and Wikidata property not defined
Usage:
{{Eliteprospects}}
Output:
- Template:PAGENAMEBASE career statistics at EliteProspects.comScript error: No such module "EditAtWikidata".Template:WikidataCheck
Tracking categories
- Category:Elite Prospects player ID not in Wikidata (0)
- Category:Elite Prospects player ID different from Wikidata (0)
- Category:Elite Prospects player ID same as Wikidata (0)
- Category:Eliteprospects template missing ID (0)
See also
Ice hockey player external link templates:
- {{Ice Hockey Stats}}
- Official league websites:
- {{AHL profile}}
- {{ECHL profile}}
- {{EIHL profile}}
- {{NHL profile}}
- {{KHL profile}}
- {{OHL profile}}
- Other websites:
- {{Eurohockey}}
- {{Hockeydb}}
- {{Hockey-reference}}
- {{Legendsmember}}
- {{Legendsofhockey}}
- {{TSN-NHL profile}}