Difference between revisions of "Template:ESPN NFL/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(fix example)
imported>Zyxw
(update Examples and See also)
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
 
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
 
{{Uses Wikidata|P3686}}
 
{{Uses Wikidata|P3686}}
 +
{{Lua|Module:EditAtWikidata}}
  
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a [[National Football League]] (NFL) player's profile at [http://www.espn.com/ ESPN.com]. It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a [[National Football League]] (NFL) 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 14: Line 15:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
  
Using [[Wikidata]] property [[d:Property:P3686|P3686]]:
+
Using [[Wikidata]] property {{Property|3686}}:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code>
 +
 +
== Examples ==
 +
 +
=== Unnamed parameters ===
 +
''Usage:''
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 10536 | Trent Edwards }}</code>
 +
 +
''Output:''
 +
:*  {{{{BASEPAGENAME}} | 10536 | Trent Edwards }}
 +
 +
''Current URLs:''
 +
: <kbd>[https://www.espn.com/nfl/player/stats/_/id/10536 https://www.espn.com/nfl/player/stats/_/id/{{hilite|10536}}]</kbd>
 +
: <kbd>[https://www.espn.com/nfl/player/stats/_/id/10536/trent-edwards https://www.espn.com/nfl/player/stats/_/id/{{hilite|10536}}/trent-edwards]</kbd>
 +
 +
''Former URLs:''
 +
: <kbd>[http://espn.go.com/nfl/player/stats/_/id/10536 http://espn.go.com/nfl/player/stats/_/id/{{hilite|10536}}]</kbd>
 +
: <kbd>[http://espn.go.com/nfl/player/stats/_/id/10536/trent-edwards http://espn.go.com/nfl/player/stats/_/id/{{hilite|10536}}/trent-edwards]</kbd>
 +
 +
=== Named parameters ===
 +
''Usage:''
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 15994 | name= Theo Riddick }}</code>
 +
 +
''Output:''
 +
:* {{{{BASEPAGENAME}} | id= 15994 | name= Theo Riddick }}
 +
 +
''Current URLs:''
 +
: <kbd>[https://www.espn.com/nfl/player/stats/_/id/15994 https://www.espn.com/nfl/player/stats/_/id/{{hilite|15994}}]</kbd>
 +
: <kbd>[https://www.espn.com/nfl/player/stats/_/id/15994/theo-riddick https://www.espn.com/nfl/player/stats/_/id/{{hilite|15994}}/theo-riddick]</kbd>
 +
 +
''Former URLs:''
 +
: <kbd>[http://espn.go.com/nfl/player/stats/_/id/15994 http://espn.go.com/nfl/player/stats/_/id/{{hilite|15994}}]</kbd>
 +
: <kbd>[http://espn.go.com/nfl/player/stats/_/id/15994/theo-riddick http://espn.go.com/nfl/player/stats/_/id/{{hilite|15994}}/theo-riddick]</kbd>
 +
 +
=== No parameters and Wikidata property not defined ===
 +
''Usage:''
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
 +
''Output:''
 +
:* {{ {{BASEPAGENAME}} }}
  
 
== TemplateData ==
 
== TemplateData ==
Line 27: 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: 15994 is the ID portion of http://www.espn.com/nfl/player/stats/_/id/15994. This parameter is optional if Wikidata property P3686 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: 15994 is the ID portion of https://www.espn.com/nfl/player/stats/_/id/15994. This parameter is optional if Wikidata property P3686 exists, but required if not.",
 
       "type": "number",
 
       "type": "number",
 
       "default": "Wikidata property P3686",
 
       "default": "Wikidata property P3686",
Line 43: Line 83:
 
}
 
}
 
</templatedata>
 
</templatedata>
 
== Examples ==
 
 
=== Unnamed parameters ===
 
''URL:''
 
: <tt>[http://www.espn.com/nfl/player/stats/_/id/10536 http://www.espn.com/nfl/player/stats/_/id/{{hilite|10536}}]</tt>
 
 
''Usage:''
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 10536 | Trent Edwards }}</code>
 
''Output:''
 
: {{{{BASEPAGENAME}} | 10536 | Trent Edwards }}
 
 
=== Named parameters ===
 
''URL:''
 
: <tt>[http://www.espn.com/nfl/player/stats/_/id/15994 http://www.espn.com/nfl/player/stats/_/id/{{hilite|15994}}]</tt>
 
 
''Usage:''
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 15994 | name= Theo Riddick }}</code>
 
''Output:''
 
: {{{{BASEPAGENAME}} | id= 15994 | name= Theo Riddick }}
 
 
=== No parameters and Wikidata property not defined ===
 
''Usage:''
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
''Output:''
 
: {{ {{BASEPAGENAME}} }}
 
  
 
== See also ==
 
== See also ==
 
* {{tl|Footballstats}}
 
* {{tl|Footballstats}}
 
Other [[ESPN]] external link templates:
 
Other [[ESPN]] external link templates:
 +
* {{tl|ESPN FC}}
 +
* {{tl|ESPN MMA}}
 
* {{tl|ESPN NHL}}
 
* {{tl|ESPN NHL}}
* {{tl|ESPN FC}}
 
 
* {{tl|ESPNcricinfo}}
 
* {{tl|ESPNcricinfo}}
 
* {{tl|ESPNscrum}}
 
* {{tl|ESPNscrum}}
Line 83: Line 98:
 
[[Category:American football external link templates]]
 
[[Category:American football external link templates]]
 
[[Category:National Football League templates]]
 
[[Category:National Football League templates]]
 
+
[[Category:External link templates using Wikidata]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 09:42, 30 October 2020

Template:Uses Wikidata

Template:ESPN NFL displays an external link to a National Football League (NFL) player's profile at ESPN.com. It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{ESPN NFL | ID }}
{{ESPN NFL | ID | NAME }}

Named parameters:

{{ESPN NFL | id= ID }}
{{ESPN NFL | id= ID | name= NAME }}

Using Wikidata property Template:Property:

{{ESPN NFL}}
{{ESPN NFL | name= NAME }}

Examples

Unnamed parameters

Usage:

* {{ESPN NFL | 10536 | Trent Edwards }}

Output:

Current URLs:

https://www.espn.com/nfl/player/stats/_/id/10536
https://www.espn.com/nfl/player/stats/_/id/10536/trent-edwards

Former URLs:

http://espn.go.com/nfl/player/stats/_/id/10536
http://espn.go.com/nfl/player/stats/_/id/10536/trent-edwards

Named parameters

Usage:

* {{ESPN NFL | id= 15994 | name= Theo Riddick }}

Output:

Current URLs:

https://www.espn.com/nfl/player/stats/_/id/15994
https://www.espn.com/nfl/player/stats/_/id/15994/theo-riddick

Former URLs:

http://espn.go.com/nfl/player/stats/_/id/15994
http://espn.go.com/nfl/player/stats/_/id/15994/theo-riddick

No parameters and Wikidata property not defined

Usage:

* {{ESPN NFL}}

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 NFL

This template displays an external link to a National Football League (NFL) 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: 15994 is the ID portion of https://www.espn.com/nfl/player/stats/_/id/15994. This parameter is optional if Wikidata property P3686 exists, but required if not.

Default
Wikidata property P3686
Numberrequired
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 "(football player)".

Default
{{PAGENAMEBASE}}
Stringoptional

See also

Other ESPN external link templates: