Difference between revisions of "Template:Hockey-reference/doc"
imported>Zyxw (→Examples: update) |
imported>Jonesey95 |
||
Line 23: | Line 23: | ||
=== Unnamed parameters === | === Unnamed parameters === | ||
''URL:'' | ''URL:'' | ||
− | : < | + | : <code>[https://www.hockey-reference.com/players/k/kanepa01.html https://www.hockey-reference.com/players/{{hilite|k/kanepa01}}.html]</code> |
''Usage:'' | ''Usage:'' | ||
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | k/kanepa01 | Patrick Kane }}</code> | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | k/kanepa01 | Patrick Kane }}</code> | ||
Line 31: | Line 31: | ||
=== Named parameters === | === Named parameters === | ||
''URL:'' | ''URL:'' | ||
− | : < | + | : <code>[https://www.hockey-reference.com/players/s/staaler01.html https://www.hockey-reference.com/players/{{hilite|s/staaler01}}.html]</code> |
''Usage:'' | ''Usage:'' | ||
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= s/staaler01 | name= Eric Staal <nowiki>}}</nowiki></code> | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= s/staaler01 | name= Eric Staal <nowiki>}}</nowiki></code> |
Latest revision as of 02:08, 3 June 2020
![]() | This is a documentation subpage for Template:Hockey-reference. It contains usage information, categories and other content that is not part of the original template page. |
![]() | This template uses Lua: |
Template:Hockey-reference displays an external link to an ice hockey player's profile at Hockey-Reference.com. It is intended for use in the external links section of an article.
Contents
Usage
Unnamed parameters:
{{Hockey-reference | ID }}
{{Hockey-reference | ID | NAME }}
Named parameters:
{{Hockey-reference | id= ID }}
{{Hockey-reference | id= ID | name= NAME }}
Using Wikidata property P3598:
{{Hockey-reference}}
{{Hockey-reference | name= NAME }}
Examples
Unnamed parameters
URL:
Usage:
* {{Hockey-reference | k/kanepa01 | Patrick Kane }}
Output:
- Patrick Kane at Hockey-Reference.comScript error: No such module "EditAtWikidata".
Named parameters
URL:
Usage:
* {{Hockey-reference | id= s/staaler01 | name= Eric Staal }}
Output:
- Eric Staal at Hockey-Reference.comScript error: No such module "EditAtWikidata".
No parameters and Wikidata property not defined
Usage:
* {{Hockey-reference}}
Output:
- Template:PAGENAMEBASE at Hockey-Reference.comScript error: No such module "EditAtWikidata".
TemplateData
TemplateData for Hockey-reference
This template displays an external link to an ice hockey player's profile at Hockey-Reference.com. It is intended for use in the external links section of an article.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Player ID | id 1 | The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL for the player's profile. Example: k/kanepa01 is the ID portion of https://www.hockey-reference.com/players/k/kanepa01.html. This parameter is optional if Wikidata property P3598 exists, but required if not.
| String | optional |
Player name | name 2 | The "name" parameter (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 |
See also
- {{Ice hockey stats}}