Difference between revisions of "Template:ESPN NHL"

From blackwiki
Jump to navigation Jump to search
imported>Bender235
m (ESPN now uses HTTPS)
imported>Zyxw
m (update link)
 
Line 1: Line 1:
 
{{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{#property:P3687}}
 
{{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{#property:P3687}}
  
| [https://www.espn.com/nhl/player/_/id/{{#if: {{{1|{{{id<includeonly>|</includeonly>}}}}}} | {{{1|{{{id}}}}}} | {{First word|1={{#property:P3687}}|sep=,}} }} {{#if: {{{2|{{{name<includeonly>|</includeonly>}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }}] at [[ESPN|ESPN.com]]<includeonly>{{EditAtWikidata|pid=P3687|{{{1|{{{id|}}}}}}}}</includeonly>
+
| [https://www.espn.com/nhl/player/_/id/{{#if: {{{1|{{{id<includeonly>|</includeonly>}}}}}} | {{{1|{{{id}}}}}} | {{First word|1={{#property:P3687}}|sep=,}} }} {{#if: {{{2|{{{name<includeonly>|</includeonly>}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }}] at [[ESPN.com]]<includeonly>{{EditAtWikidata|pid=P3687|{{{1|{{{id|}}}}}}}}</includeonly>
  
 
| <span class="error">&#123;&#123;[[Template:ESPN NHL|ESPN NHL]]&#125;&#125; template missing ID and not present in Wikidata.</span>
 
| <span class="error">&#123;&#123;[[Template:ESPN NHL|ESPN NHL]]&#125;&#125; 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>

Latest revision as of 08:36, 30 October 2020

{{{name}}} at ESPN.com

Template documentation[view] [edit] [history] [purge]

Template:Uses Wikidata Lua error in Module:Lua_banner at line 113: attempt to index field 'edit' (a nil value).

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.

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:

Current URLs:

https://www.espn.com/nhl/player/_/id/386
https://www.espn.com/nhl/player/_/id/386/marian-hossa

Former URLs:

http://espn.go.com/nhl/player/_/id/386
http://espn.go.com/nhl/player/_/id/386/marian-hossa

Named parameters

Usage:

* {{ESPN NHL | id= 3024816 | name= Austin Czarnik }}

Output:

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:

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 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.

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

Default
Wikidata property P3687
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

Other ESPN external link templates: