Difference between revisions of "Template:Eliteprospects/doc"
imported>Zyxw m (→Tracking categories: update category links using AWB) |
imported>Zyxw (Update documentation, TemplateData, examples. Add link to tracking category.) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| − | <!-- | + | <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata --> |
{{Uses Wikidata|P2481}} | {{Uses Wikidata|P2481}} | ||
{{Tracks Wikidata|P2481}} | {{Tracks Wikidata|P2481}} | ||
| − | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[ice hockey]] player's profile at [http://www.eliteprospects.com EliteProspects.com]. | + | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[ice hockey]] player's profile at [http://www.eliteprospects.com EliteProspects.com]. It is intended for use in the [[Wikipedia:External links|external links]] section of an article. |
== Usage == | == Usage == | ||
| − | + | Unnamed parameters: | |
| − | : | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code> |
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code> | ||
| + | |||
| + | Named parameters: | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code> | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code> | ||
| + | |||
| + | Using [[Wikidata]] property [[d:Property:P2481|P2481]]: | ||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
| − | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code> | |
| − | |||
| − | |||
| − | |||
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ||
| − | |||
== TemplateData == | == TemplateData == | ||
{{TemplateDataHeader}} | {{TemplateDataHeader}} | ||
| − | <templatedata>{ | + | <templatedata> |
| − | "description": "This template displays an external link to an ice hockey player's profile at EliteProspects.com.", | + | { |
| − | "params": { | + | "description": "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.", |
| − | + | "params": { | |
| − | + | "id": { | |
| − | + | "label": "EliteProspects player ID", | |
| − | + | "aliases": ["1"], | |
| − | + | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion the URL for the player's profile at EliteProspects.com. 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", | |
| − | + | "default": "Wikidata property P2481", | |
| − | + | "required": true | |
| − | + | }, | |
| − | + | "name": { | |
| − | + | "label": "Player name", | |
| − | + | "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)\".", | |
| − | + | "type": "string", | |
| − | + | "default": "{{PAGENAMEBASE}}", | |
| + | "required": false | ||
| + | } | ||
} | } | ||
| − | } | + | } |
| + | </templatedata> | ||
== Examples == | == Examples == | ||
| Line 44: | Line 49: | ||
=== Unnamed parameters === | === Unnamed parameters === | ||
''Usage:'' | ''Usage:'' | ||
| − | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 2092 | Tomi Kallio }}</code> | |
''Output:'' | ''Output:'' | ||
| − | + | : {{{{BASEPAGENAME}} | 2092 | Tomi Kallio }} | |
''URL:'' | ''URL:'' | ||
| − | + | : <tt>[http://www.eliteprospects.com/player.php?player=2092&lang=en http://www.eliteprospects.com/player.php?player={{hilite|2092}}&lang=en]</tt> | |
=== Named parameters === | === Named parameters === | ||
; name | ; name | ||
''Usage:'' | ''Usage:'' | ||
| − | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 9678 | name= Wayne Gretzky <nowiki>}}</nowiki></code> | |
''Output:'' | ''Output:'' | ||
| − | + | : {{{{BASEPAGENAME}} | id= 9678 | name= Wayne Gretzky }} | |
''URL:'' | ''URL:'' | ||
| − | + | : <tt>[http://www.eliteprospects.com/player.php?player=9678&lang=en http://www.eliteprospects.com/player.php?player={{hilite|9678}}&lang=en]</tt> | |
; title | ; title | ||
''Usage:'' | ''Usage:'' | ||
| − | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 8627 | title= Jaromír Jágr <nowiki>}}</nowiki></code> | |
''Output:'' | ''Output:'' | ||
| − | + | : {{{{BASEPAGENAME}} | id= 8627 | title= Jaromír Jágr }} | |
''URL:'' | ''URL:'' | ||
| − | + | : <tt>[http://www.eliteprospects.com/player.php?player=8627&lang=en http://www.eliteprospects.com/player.php?player={{hilite|8627}}&lang=en]</tt> | |
| + | |||
| + | === No parameters and Wikidata property not defined === | ||
| + | ''Usage:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
| + | ''Output:'' | ||
| + | : {{ {{BASEPAGENAME}} }} | ||
| − | ==Tracking categories== | + | == Tracking categories == |
* {{clc|Elite Prospects player ID not in Wikidata}} | * {{clc|Elite Prospects player ID not in Wikidata}} | ||
* {{clc|Elite Prospects player ID different from Wikidata}} | * {{clc|Elite Prospects player ID different from Wikidata}} | ||
* {{clc|Elite Prospects player ID same as Wikidata}} | * {{clc|Elite Prospects player ID same as Wikidata}} | ||
| − | * {{ | + | * {{clc|Eliteprospects template missing ID}} |
== See also == | == See also == | ||
| Line 91: | Line 102: | ||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
| − | <!-- Categories below this line | + | <!-- Categories below this line; interwikis at Wikidata --> |
[[Category:Ice hockey external link templates]] | [[Category:Ice hockey external link templates]] | ||
[[Category:WikiProject Ice Hockey templates]] | [[Category:WikiProject Ice Hockey templates]] | ||
Revision as of 12:47, 24 February 2017
| File:Edit-copy green.svg | 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 the URL for the player's profile at EliteProspects.com. 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 | required |
| Player 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:
- 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}}