Difference between revisions of "Template:ESPN NHL/doc"
imported>Bender235 m (→Examples) |
imported>Zyxw (update Examples and See also) |
||
| Line 4: | Line 4: | ||
{{Lua|Module:EditAtWikidata}} | {{Lua|Module:EditAtWikidata}} | ||
| − | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a [[National Hockey League]] (NHL) player's profile at [ | + | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a [[National Hockey League]] (NHL) player's profile at [[ESPN.com]]. It is intended for use in the [[Wikipedia:External links|external links]] section of an article. |
== Usage == | == Usage == | ||
| Line 22: | Line 22: | ||
=== Unnamed parameters === | === Unnamed parameters === | ||
| − | |||
| − | |||
| − | |||
''Usage:'' | ''Usage:'' | ||
| − | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 386 | | + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 386 | Marian Hossa }}</code> |
''Output:'' | ''Output:'' | ||
| − | :* {{{{BASEPAGENAME}} | 386 | | + | :* {{{{BASEPAGENAME}} | 386 | Marian Hossa }} |
| + | |||
| + | ''Current URLs:'' | ||
| + | : <kbd>[https://www.espn.com/nhl/player/_/id/386 https://www.espn.com/nhl/player/_/id/{{highlight|386}}]</kbd> | ||
| + | : <kbd>[https://www.espn.com/nhl/player/_/id/386/marian-hossa https://www.espn.com/nhl/player/_/id/{{highlight|386}}/marian-hossa]</kbd> | ||
| + | |||
| + | ''Former URLs:'' | ||
| + | : <kbd>[http://espn.go.com/nhl/player/_/id/386 http://espn.go.com/nhl/player/_/id/{{highlight|386}}]</kbd> | ||
| + | : <kbd>[http://espn.go.com/nhl/player/_/id/386/marian-hossa http://espn.go.com/nhl/player/_/id/{{highlight|386}}/marian-hossa]</kbd> | ||
=== Named parameters === | === Named parameters === | ||
| − | |||
| − | |||
| − | |||
''Usage:'' | ''Usage:'' | ||
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 3024816 | name= Austin Czarnik <nowiki>}}</nowiki></code> | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 3024816 | name= Austin Czarnik <nowiki>}}</nowiki></code> | ||
| Line 40: | Line 42: | ||
''Output:'' | ''Output:'' | ||
:* {{{{BASEPAGENAME}} | id= 3024816 | name= Austin Czarnik }} | :* {{{{BASEPAGENAME}} | id= 3024816 | name= Austin Czarnik }} | ||
| + | |||
| + | ''Current URLs:'' | ||
| + | : <kbd>[https://www.espn.com/nhl/player/_/id/3024816 https://www.espn.com/nhl/player/_/id/{{highlight|3024816}}]</kbd> | ||
| + | : <kbd>[https://www.espn.com/nhl/player/_/id/3024816/austin-czarnik https://www.espn.com/nhl/player/_/id/{{highlight|3024816}}/austin-czarnik]</kbd> | ||
| + | |||
| + | ''Former URLs:'' | ||
| + | : <kbd>[http://espn.go.com/nhl/player/_/id/3024816 http://espn.go.com/nhl/player/_/id/{{highlight|3024816}}]</kbd> | ||
| + | : <kbd>[http://espn.go.com/nhl/player/_/id/3024816/austin-czarnik http://espn.go.com/nhl/player/_/id/{{highlight|3024816}}/austin-czarnik]</kbd> | ||
=== No parameters and Wikidata property not defined === | === No parameters and Wikidata property not defined === | ||
| Line 57: | Line 67: | ||
"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: 386 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: 386 is the ID portion of https://www.espn.com/nhl/player/_/id/386. This parameter is optional if Wikidata property P3687 exists, but required if not.", |
"type": "number", | "type": "number", | ||
"required": false, | "required": false, | ||
| Line 78: | Line 88: | ||
Other [[ESPN]] external link templates: | Other [[ESPN]] external link templates: | ||
* {{tl|ESPN FC}} | * {{tl|ESPN FC}} | ||
| + | * {{tl|ESPN MMA}} | ||
* {{tl|ESPN NFL}} | * {{tl|ESPN NFL}} | ||
* {{tl|ESPNcricinfo}} | * {{tl|ESPNcricinfo}} | ||
Latest revision as of 09:53, 30 October 2020
| 40px | This is a documentation subpage for Template:ESPN NHL. It contains usage information, categories and other content that is not part of the original template page. |
| 30px | This template uses Lua: |
Template:ESPN NHL displays an external link to a National Hockey League (NHL) player's profile at ESPN.com. It is intended for use in the external links section of an article.
Contents
Usage
Unnamed parameters:
{{ESPN NHL | ID }}{{ESPN NHL | ID | NAME }}
Named parameters:
{{ESPN NHL | id= ID }}{{ESPN NHL | id= ID | name= NAME }}
Using Wikidata property Template:Property:
{{ESPN NHL}}{{ESPN NHL | name= NAME }}
Examples
Unnamed parameters
Usage:
* {{ESPN NHL | 386 | Marian Hossa }}
Output:
- Marian Hossa at ESPN.comScript error: No such module "EditAtWikidata".
Current URLs:
Former URLs:
Named parameters
Usage:
* {{ESPN NHL | id= 3024816 | name= Austin Czarnik }}
Output:
- Austin Czarnik at ESPN.comScript error: No such module "EditAtWikidata".
Current URLs:
- https://www.espn.com/nhl/player/_/id/3024816
- https://www.espn.com/nhl/player/_/id/3024816/austin-czarnik
Former URLs:
- http://espn.go.com/nhl/player/_/id/3024816
- http://espn.go.com/nhl/player/_/id/3024816/austin-czarnik
No parameters and Wikidata property not defined
Usage:
* {{ESPN NHL}}
Output:
- Template:PAGENAMEBASE at ESPN.comScript error: No such module "EditAtWikidata".
TemplateData
TemplateData for ESPN NHL
This template displays an external link to a National Hockey League (NHL) player's profile at ESPN.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: 386 is the ID portion of https://www.espn.com/nhl/player/_/id/386. This parameter is optional if Wikidata property P3687 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
- {{Ice hockey stats}}
Other ESPN external link templates:
- {{ESPN FC}}
- {{ESPN MMA}}
- {{ESPN NFL}}
- {{ESPNcricinfo}}
- {{ESPNscrum}}