Difference between revisions of "Template:KHL profile/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(updates for use of Wikidata property, misc formatting)
imported>Jonesey95
m (Fix Linter errors using AutoEd)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
{{Uses Wikidata|P3652}}
 
{{Uses Wikidata|P3652}}
{{Lua|Module:EditAtWikidata}}
+
{{Tracks Wikidata|P3652}}
 +
{{Lua|Module:EditAtWikidata|Module:WikidataCheck}}
  
 
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[ice hockey]] player's official [[Kontinental Hockey League]] (KHL) profile and statistics page. It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
 
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[ice hockey]] player's official [[Kontinental Hockey League]] (KHL) profile and statistics page. It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
Line 23: Line 24:
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
 
''URL:''
 
''URL:''
: <tt>[http://en.khl.ru/players/3950/ http://en.khl.ru/players/{{hilite|3950}}/]</tt>
+
: <code>[http://en.khl.ru/players/3950/ http://en.khl.ru/players/{{hilite|3950}}/]</code>
 
''Usage:''
 
''Usage:''
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 3950 | Anton Babchuk }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 3950 | Anton Babchuk }}</code>
 
''Output:''
 
''Output:''
: {{{{BASEPAGENAME}} | 3950 | Anton Babchuk }}
+
:* {{{{BASEPAGENAME}} | 3950 | Anton Babchuk }}
  
 
=== Named parameters ===
 
=== Named parameters ===
 
''URL:''
 
''URL:''
: <tt>[http://en.khl.ru/players/13851/ http://en.khl.ru/players/{{hilite|13851}}/]</tt>
+
: <code>[http://en.khl.ru/players/13851/ http://en.khl.ru/players/{{hilite|13851}}/]</code>
 
''Usage:''
 
''Usage:''
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 13851 | name= Jaromir Jagr }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 13851 | name= Jaromir Jagr }}</code>
 
''Output:''
 
''Output:''
: {{{{BASEPAGENAME}} | id= 13851 | name= Jaromir Jagr }}
+
:* {{{{BASEPAGENAME}} | id= 13851 | name= Jaromir Jagr }}
  
 
=== No parameters and Wikidata property not defined ===
 
=== No parameters and Wikidata property not defined ===
 
''Usage:''
 
''Usage:''
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
''Output:''
 
''Output:''
: {{ {{BASEPAGENAME}} }}
+
:* {{ {{BASEPAGENAME}} }}
 +
 
 +
== Tracking categories ==
 +
* {{clc|KHL profile not in Wikidata}}
 +
* {{clc|KHL profile different from Wikidata}}
 +
* {{clc|KHL profile same as Wikidata}}
  
 
== TemplateData ==
 
== TemplateData ==
Line 96: Line 102:
 
[[Category:WikiProject Ice Hockey templates]]
 
[[Category:WikiProject Ice Hockey templates]]
 
[[Category:External link templates using Wikidata]]
 
[[Category:External link templates using Wikidata]]
 +
[[Category:Templates that add a tracking category]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 02:23, 3 June 2020

Template:Uses Wikidata Template:Tracks Wikidata

Template:KHL profile displays an external link to an ice hockey player's official Kontinental Hockey League (KHL) profile and statistics page. It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{KHL profile | ID }}
{{KHL profile | ID | NAME }}

Named parameters:

{{KHL profile | id= ID }}
{{KHL profile | id= ID | name= NAME }}

Using Wikidata property P3652:

{{KHL profile}}
{{KHL profile | name= NAME }}

Examples

Unnamed parameters

URL:

http://en.khl.ru/players/3950/

Usage:

* {{KHL profile | 3950 | Anton Babchuk }}

Output:

Named parameters

URL:

http://en.khl.ru/players/13851/

Usage:

* {{KHL profile | id= 13851 | name= Jaromir Jagr }}

Output:

No parameters and Wikidata property not defined

Usage:

* {{KHL profile}}

Output:

Tracking categories

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 KHL profile

This template displays an external link to an ice hockey player's official Kontinental Hockey League (KHL) profile and statistics page. It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
idid 1

ID number found in URL of the player's official KHL page. Example: 3950 for URL http://en.khl.ru/players/3950/. This parameter is optional if Wikidata property P3652 exists, but required if not.

Default
Wikidata property P3652
Numberoptional
namename 2

Name of player. If not given 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: