Template:Cricinfo/sandbox

From Wikipedia, the free encyclopedia
Jump to: navigation, search

{{{name}}} at ESPNcricinfo

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

Template:Cricinfo displays an external link to an ESPNcricinfo web page. Links to cricket player profiles are created with the "id" parameter and links to other pages are created with the "ref" parameter. This id value should be added to the ESPNcricinfo player ID property in Wikidata. If this is done, then no id or ref parameters are needed to be used as the template will automatically retrieve the id value from Wikidata. However, if the id or ref is specified, then that value is used in preference to the Wikidata value. Discrepancies between the id or ref values and the Wikidata values are reported at Category:Cricinfo maintenance. It is intended for use in the external links section of an article.

Usage[edit]

Using the "id" from Wikidata:

{{Cricinfo}}
{{Cricinfo | name= NAME }}
{{Cricinfo | name= NAME | accessdate= DATE }}

Using "id" parameter:

{{Cricinfo | id= ID }}
{{Cricinfo | id= ID | name= NAME }}
{{Cricinfo | id= ID | name= NAME | accessdate= DATE }}

Using "ref" parameter:

{{Cricinfo | ref= REF }}
{{Cricinfo | ref= REF | name= NAME }}
{{Cricinfo | ref= REF | name= NAME | accessdate= DATE }}

TemplateData[edit]

This is the TemplateData documentation for this template used by VisualEditor and other tools.

See the monthly error report for this template.

TemplateData for Cricinfo

This template displays an external link to an ESPNcricinfo web page. Links to cricket player profiles are created with the "id" parameter and links to other pages are created with the "ref" parameter. If "id" and "ref" parameters are omitted, the value stored in Wikidata is used. It is intended for use in the external links section of an article.

Template parameters

Parameter Description Type Status
id id

The "id" parameter should contain the ID number in the URL for the player's profile. Example: 35320 is the "id" in http://www.espncricinfo.com/ci/content/player/35320.html. Can be omitted if the id value exists in Wikidata.

Default
empty
Example
empty
Auto value
empty
Number optional
ref ref

The "ref" parameter is optional and only used when the player "id" is not specified. If used, it should contain the portion of the URL between "http://www.espncricinfo.com/" and ".html". Example: pakistan/content/ground/59011 is the "ref" portion of http://www.espncricinfo.com/pakistan/content/ground/59011.html.

Default
empty
Example
empty
Auto value
empty
String optional
name name

The "name" parameter may be used to specify the link text. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(cricketer)".

Default
{{PAGENAMEBASE}}
Example
empty
Auto value
empty
String optional
accessdate accessdate

The "accessdate" parameter may be used to document the date when the link was accessed or retrieved. This parameter is optional.

Default
empty
Example
empty
Auto value
empty
Date optional
check-wikidata check-wikidata

Set "check-wikidate=no" to prevent the template comparing the provided id or ref value against the value from wikidata. Use mainly when this template is used on list, place or other people's articles.

Default
empty
Example
no
Auto value
empty
String optional

Examples[edit]

Using Wikidata id parameter[edit]

URL:

http://www.espncricinfo.com/ci/content/player/35320.html

Usage:

{{Cricinfo | name= Sachin Tendulkar }}
Sachin Tendulkar at ESPNcricinfo

Usage with accessdate parameter:

{{Cricinfo | name= Sachin Tendulkar | accessdate= 25 February 2017 }}
"Sachin Tendulkar". ESPNcricinfo. Retrieved 25 February 2017.


Using "id" parameter[edit]

URL:

http://www.espncricinfo.com/ci/content/player/35320.html

Usage:

{{Cricinfo | id= 35320 | name= Sachin Tendulkar }}
Sachin Tendulkar at ESPNcricinfo

Usage with accessdate parameter:

{{Cricinfo | id= 35320 | name= Sachin Tendulkar | accessdate= 25 February 2017 }}
"Sachin Tendulkar". ESPNcricinfo. Retrieved 25 February 2017.

Using "ref" parameter[edit]

URL:

http://www.espncricinfo.com/pakistan/content/player/39343.html

Usage:

{{Cricinfo | ref= pakistan/content/ground/59011 | name= Zafar Ali Stadium }}
Zafar Ali Stadium at ESPNcricinfo

Usage with ".html" in ref parameter:

{{Cricinfo | ref= pakistan/content/ground/59011.html | name= Zafar Ali Stadium }}
Zafar Ali Stadium at ESPNcricinfo

Usage with accessdate parameter:

{{Cricinfo | ref= pakistan/content/ground/59011 | name= Zafar Ali Stadium | accessdate= 25 February 2017 }}
"Zafar Ali Stadium". ESPNcricinfo. Retrieved 25 February 2017.

Tracking category[edit]

See also[edit]

Other ESPN external link templates: