Difference between revisions of "Template:CapFriendly"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (Since <tt> is obsolete in HTML5, replace it with <kbd> – see HTML element#tt, Wikipedia:HTML5, and mw:Help:Extension:Linter/obsolete-tag. using AWB)
imported>Zyxw
m (Fix for empty name parameter. using AWB)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[https://www.capfriendly.com/players/{{Trim|{{{1|{{{id<includeonly>|</includeonly>}}}}}}}} {{{2|{{{name<includeonly>|{{PAGENAMEBASE}}</includeonly>}}}}}} player profile] at [[CapFriendly]]<noinclude>
+
[https://www.capfriendly.com/players/{{Trim|{{{1|{{{id<includeonly>|</includeonly>}}}}}}}} {{#if: {{{2|{{{name<includeonly>|</includeonly>}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }} player profile] at [[CapFriendly]]<noinclude>
 
+
{{Documentation}}
== Usage ==
+
</noinclude>
Unnamed parameters:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
 
 
 
Named parameters:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 
 
 
== Examples ==
 
 
 
=== Unnamed parameters ===
 
''URLs:''
 
: <kbd>[https://www.capfriendly.com/players/eric-staal https://www.capfriendly.com/ice/players/{{hilite|eric-staal}}]</kbd>
 
: <kbd>[https://www.capfriendly.com/players/sidney-crosby https://www.capfriendly.com/players/{{hilite|sidney-crosby}}]</kbd>
 
: <kbd>[https://www.capfriendly.com/players/daniel-alfredsson https://www.capfriendly.com/players/{{hilite|daniel-alfredsson}}]</kbd>
 
 
 
''Usage:''
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | sidney-crosby | Sidney Crosby }}</code>
 
 
 
''Output:''
 
:* {{{{BASEPAGENAME}} | sidney-crosby | Sidney Crosby }}
 
 
 
=== Named parameters ===
 
''URLs:''
 
: <kbd>[https://www.capfriendly.com/players/eric-staal https://www.capfriendly.com/ice/players/{{hilite|eric-staal}}]</kbd>
 
: <kbd>[https://www.capfriendly.com/players/sidney-crosby https://www.capfriendly.com/players/{{hilite|sidney-crosby}}]</kbd>
 
: <kbd>[https://www.capfriendly.com/players/daniel-alfredsson https://www.capfriendly.com/players/{{hilite|daniel-alfredsson}}]</kbd>
 
 
 
''Usage:''
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= sidney-crosby | name= Sidney Crosby <nowiki>}}</nowiki></code>
 
 
 
''Output:''
 
:* {{{{BASEPAGENAME}} | id= sidney-crosby | name= Sidney Crosby }}
 
 
 
=== No parameters and Wikidata property not defined ===
 
''Usage:''
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
 
 
''Output:''
 
:* {{ {{BASEPAGENAME}} }}
 
 
 
== TemplateData ==
 
{{TemplateData header}}
 
<templatedata>
 
{
 
  "description": "This template displays an external link to an ice hockey player's CapFriendly page. It is intended for use in the external links section of an article.",
 
  "params": {
 
    "id": {
 
      "label": "Player ID",
 
      "aliases": ["1"],
 
      "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL for the player's profile. Example: sidney-crosby is the ID portion of https://www.capfriendly.com/players/sidney-crosby.",
 
      "type": "number",
 
      "required": false
 
    },
 
    "name": {
 
      "label": "Player name",
 
      "aliases": ["2"],
 
      "description": "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)\".",
 
      "type": "string",
 
      "required": false,
 
      "default": "{{PAGENAMEBASE}}"
 
    }
 
  },
 
  "paramOrder": [
 
    "id",
 
    "name"
 
  ]
 
}
 
</templatedata>
 
 
 
== See also ==
 
Ice hockey player external link templates:
 
* {{tl|Ice hockey stats}}
 
* Official league websites:
 
** {{tl|AHL profile}}
 
** {{tl|ECHL profile}}
 
** {{tl|EIHL profile}}
 
** {{tl|KHL profile}}
 
** {{tl|OHL profile}}
 
* Other websites:
 
** {{tl|Eliteprospects}}
 
** {{tl|Eurohockey}}
 
** {{tl|HockeyDB}}
 
** {{tl|Hockey-reference}}
 
** {{tl|Legendsmember}}
 
** {{tl|Legendsofhockey}}
 
** {{tl|TSN-NHL profile}}
 
 
 
== External links ==
 
* [https://www.nhl.com/player/ Player search page at NHL.com]
 
* [http://www.nhl.com/stats/player Player stats page at NHL.com]<!-- does not work with https:// -->
 
 
 
<includeonly>{{sandbox other||
 
<!-- Categories below this line; interwikis at Wikidata -->
 
[[Category:Ice hockey external link templates]]
 
[[Category:People and person external link templates]]
 
[[Category:External link templates using Wikidata]]
 
}}</includeonly>
 

Latest revision as of 06:09, 5 August 2018

{{{name}}} player profile at CapFriendly

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

Template:CapFriendly displays an external link to a web page about an ice hockey player at CapFriendly. It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{CapFriendly | ID }}
{{CapFriendly | ID | NAME }}

Named parameters:

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

Examples

Unnamed parameters

URL:

https://www.capfriendly.com/players/sidney-crosby

Usage:

* {{CapFriendly | sidney-crosby | Sidney Crosby }}

Output:

Named parameters

URL:

https://www.capfriendly.com/players/eric-staal

Usage:

* {{CapFriendly | id= eric-staal | name= Eric Staal }}

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 CapFriendly

This template displays an external link to a web page about an ice hockey player at CapFriendly. 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: sidney-crosby is the ID portion of https://www.capfriendly.com/players/sidney-crosby.

Stringrequired
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

Ice hockey player external link templates:

External links