Difference between revisions of "Template:Legendsofhockey/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(update usage and examples)
imported>Zyxw
(update URLs)
Line 24: Line 24:
  
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
''URL:''
 
: <kbd>[http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279 http://www.legendsofhockey.net/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>
Line 32: Line 29:
 
''Output:''
 
''Output:''
 
:* {{{{BASEPAGENAME}} | 14279 | Eddie Shack }}
 
:* {{{{BASEPAGENAME}} | 14279 | Eddie Shack }}
 +
 +
''URLs:''
 +
: <kbd>[http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279 http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player={{hilite|14279}}]</kbd>
 +
: <kbd>[http://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279 http://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player={{hilite|14279}}]</kbd>
  
 
=== Named parameters ===
 
=== Named parameters ===
''URL:''
 
: <kbd>[http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=21614 http://www.legendsofhockey.net/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>
Line 42: Line 40:
 
''Output:''
 
''Output:''
 
:* {{{{BASEPAGENAME}} | id= 21614 | name= Sidney Crosby }}
 
:* {{{{BASEPAGENAME}} | id= 21614 | name= Sidney Crosby }}
 +
 +
''URLs:''
 +
: <kbd>[http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=21614 http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player={{hilite|21614}}]</kbd>
 +
: <kbd>[http://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=21614 http://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player={{hilite|21614}}]</kbd>
  
 
=== No parameters and Wikidata property not defined ===
 
=== No parameters and Wikidata property not defined ===
Line 59: Line 61:
 
       "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 http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279. This parameter is optional if Wikidata property P3567 exists, but required if not.",
+
       "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 http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279 or http://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,

Revision as of 02:12, 12 March 2020

Template:Uses Wikidata

Template:Legendsofhockey 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.

Usage

Unnamed parameters:

{{Legendsofhockey | ID }}
{{Legendsofhockey | ID | NAME }}

Named parameters:

{{Legendsofhockey | id= ID }}
{{Legendsofhockey | id= ID | name= NAME }}

Using Wikidata property Template:Property:

{{Legendsofhockey}}
{{Legendsofhockey | name= NAME }}

Examples

Unnamed parameters

Usage:

* {{Legendsofhockey | 14279 | Eddie Shack }}

Output:

URLs:

http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279
http://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279

Named parameters

Usage:

* {{Legendsofhockey | id= 21614 | name= Sidney Crosby }}

Output:

URLs:

http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=21614
http://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=21614

No parameters and Wikidata property not defined

Usage:

* {{Legendsofhockey}}

Output:

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Legendsofhockey

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.

Template parameters

ParameterDescriptionTypeStatus
Player IDid 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 http://www.legendsofhockey.net/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279 or http://www.hhof.com/LegendsOfHockey/jsp/SearchPlayer.jsp?player=14279. This parameter is optional if Wikidata property P3567 exists, but required if not.

Default
Wikidata property P3567
Numberoptional
Player namename 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)".

Default
{{PAGENAMEBASE}}
Stringoptional

See also