Difference between revisions of "Template:HHOF NHL player/doc"
imported>Zyxw (→Examples: update) |
imported>Zyxw (use https, misc formatting) |
||
| Line 16: | Line 16: | ||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code> | ||
| − | Using [[Wikidata]] property | + | Using [[Wikidata]] property {{Property|3567}}: |
: <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}} | name= ''NAME'' }}</code> | ||
| Line 24: | Line 24: | ||
=== Unnamed parameters === | === Unnamed parameters === | ||
''URL:'' | ''URL:'' | ||
| − | : < | + | : <kbd>[https://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279 https://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player={{hilite|14279}}]</kbd> |
| + | |||
''Usage:'' | ''Usage:'' | ||
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 14279 | Eddie Shack }}</code> | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 14279 | Eddie Shack }}</code> | ||
| + | |||
''Output:'' | ''Output:'' | ||
| − | :* {{{{BASEPAGENAME}} | 14279 | | + | :* {{{{BASEPAGENAME}} | 14279 | Eddie Shack }} |
=== Named parameters === | === Named parameters === | ||
''URL:'' | ''URL:'' | ||
| − | : < | + | : <kbd>[https://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=21614 https://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player={{hilite|21614}}]</kbd> |
| + | |||
''Usage:'' | ''Usage:'' | ||
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 21614 | name= Sidney Crosby }}</code> | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 21614 | name= Sidney Crosby }}</code> | ||
| + | |||
''Output:'' | ''Output:'' | ||
:* {{{{BASEPAGENAME}} | id= 21614 | name= Sidney Crosby }} | :* {{{{BASEPAGENAME}} | id= 21614 | name= Sidney Crosby }} | ||
| Line 41: | Line 45: | ||
''Usage:'' | ''Usage:'' | ||
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
| + | |||
''Output:'' | ''Output:'' | ||
:* {{ {{BASEPAGENAME}} }} | :* {{ {{BASEPAGENAME}} }} | ||
| Line 53: | Line 58: | ||
"label": "Player ID", | "label": "Player ID", | ||
"aliases": ["1"], | "aliases": ["1"], | ||
| − | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL for the player's profile. Example: 14279 is the ID portion of | + | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL for the player's profile. Example: 14279 is the ID portion of https://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279. This parameter is optional if Wikidata property P3567 exists, but required if not.", |
"type": "number", | "type": "number", | ||
"required": false, | "required": false, | ||
| Line 80: | Line 85: | ||
== External links == | == External links == | ||
| − | * [ | + | * [https://www.hhof.com/html/search.shtml NHL player search] at HHOF.com |
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
Revision as of 10:37, 18 September 2018
| This is a documentation subpage for Template:HHOF NHL player. It contains usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
Template:HHOF NHL player displays an external link to an NHL ice hockey player's profile at the Hockey Hall of Fame website. It is intended for use in the external links section of an article.
Contents
Usage
Unnamed parameters:
{{HHOF NHL player | ID }}{{HHOF NHL player | ID | NAME }}
Named parameters:
{{HHOF NHL player | id= ID }}{{HHOF NHL player | id= ID | name= NAME }}
Using Wikidata property Template:Property:
{{HHOF NHL player}}{{HHOF NHL player | name= NAME }}
Examples
Unnamed parameters
URL:
Usage:
* {{HHOF NHL player | 14279 | Eddie Shack }}
Output:
- Eddie Shack biography at Legends of HockeyScript error: No such module "EditAtWikidata".
Named parameters
URL:
Usage:
* {{HHOF NHL player | id= 21614 | name= Sidney Crosby }}
Output:
- Sidney Crosby biography at Legends of HockeyScript error: No such module "EditAtWikidata".
No parameters and Wikidata property not defined
Usage:
* {{HHOF NHL player}}
Output:
- Template:PAGENAMEBASE biography at Legends of HockeyScript error: No such module "EditAtWikidata".
TemplateData
TemplateData for HHOF NHL player
This template displays an external link to an NHL ice hockey player's profile at the Hockey Hall of Fame website. 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: 14279 is the ID portion of https://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279. This parameter is optional if Wikidata property P3567 exists, but required if not.
| Number | 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
- {{NHL profile}}
- {{TSN-NHL profile}}
- {{ESPN NHL}}
External links
- NHL player search at HHOF.com