Difference between revisions of "Template:HHOF NHL player"
imported>Zyxw (create) |
imported>Zyxw m (Fixes for empty id/name parameters. Remove {{Trim|}} since {{#if:}} does same. If Wikidata property has multiple values, only use first one.) |
||
| Line 1: | Line 1: | ||
{{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{#property:P3567}} | {{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{#property:P3567}} | ||
| − | |[http://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player={{ | + | | [http://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player={{#if: {{{1|{{{id<includeonly>|</includeonly>}}}}}} | {{{1|{{{id}}}}}} | {{First word|1={{#property:P3567}}|sep=,}} }} {{#if: {{{2|{{{name<includeonly>|</includeonly>}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }}] NHL player profile at the [[Hockey Hall of Fame]]<includeonly>{{EditAtWikidata|pid=P3567|{{{1|{{{id|}}}}}}}}</includeonly> |
| − | |<span class="error">{{[[Template:HHOF NHL player|HHOF NHL player]]}} template missing ID and not present in Wikidata.</span> | + | | <span class="error">{{[[Template:HHOF NHL player|HHOF NHL player]]}} template missing ID and not present in Wikidata.</span> |
}}<noinclude> | }}<noinclude> | ||
{{Documentation}}<!-- Please add categories to the /doc subpage & add interwikis to Wikidata. --> | {{Documentation}}<!-- Please add categories to the /doc subpage & add interwikis to Wikidata. --> | ||
</noinclude> | </noinclude> | ||
Revision as of 09:51, 18 September 2018
{{{name}}} NHL player profile at the Hockey Hall of Fame
Template:Uses Wikidata Lua error in Module:Lua_banner at line 113: attempt to index field 'edit' (a nil value).
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
Usage:
* {{HHOF NHL player | 14279 | Eddie Shack }}
Output:
- Eddie Shack NHL player profile at the Hockey Hall of FameScript error: No such module "EditAtWikidata".
URLs:
- https://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279
- http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279
Named parameters
Usage:
* {{HHOF NHL player | id= 21614 | name= Sidney Crosby }}
Output:
- Sidney Crosby NHL player profile at the Hockey Hall of FameScript error: No such module "EditAtWikidata".
URLs:
- https://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=21614
- http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=21614
No parameters and Wikidata property not defined
Usage:
* {{HHOF NHL player}}
Output:
- Template:PAGENAMEBASE NHL player profile at the Hockey Hall of FameScript 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 or http://www.legendsofhockey.net/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
- {{Legendsmember}} for NHL players inducted into the Hockey Hall of Fame
External link
| The above documentation is transcluded from Template:HHOF NHL player/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |