Difference between revisions of "Template:Cricketarchive/doc"
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>Galobtter (fix lnt) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- 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. --> | ||
| − | + | {{Template redirect|CricketArchive}} | |
{{Uses Wikidata|P2698}} | {{Uses Wikidata|P2698}} | ||
{{Lua|Module:EditAtWikidata}} | {{Lua|Module:EditAtWikidata}} | ||
Revision as of 11:09, 24 August 2018
| This is a documentation subpage for Template:Cricketarchive. It contains usage information, categories and other content that is not part of the original template page. |
Template:Template redirect Template:Uses Wikidata
| This template uses Lua: |
Template:Cricketarchive displays an external link to a CricketArchive web page. Links to cricket player profiles are created with the "id" parameter and links to other pages are created with the "ref" parameter. It is intended for use in the external links section of an article.
For players, the "id" value should be added to the Template:Wpl property in Wikidata. Then, if the "id" or "ref" parameters are not specified, the template will retrieve the id from Wikidata.
Contents
Usage
Using "id" from Wikidata:
{{Cricketarchive}}{{Cricketarchive | name= NAME }}{{Cricketarchive | name= NAME | accessdate= DATE }}
Using "id" parameter:
{{Cricketarchive | id= ID }}{{Cricketarchive | id= ID | name= NAME }}{{Cricketarchive | id= ID | name= NAME | accessdate= DATE }}
Using "ref" parameter:
{{Cricketarchive | ref= REF }}{{Cricketarchive | ref= REF | name= NAME }}{{Cricketarchive | ref= REF | name= NAME | accessdate= DATE }}
Examples
Using "id" from Wikidata
The Wikidata examples are simulated, they only work as shown if used in the Sachin Tendulkar article.
Usage:
{{Cricketarchive}}- Sachin Tendulkar at CricketArchiveScript error: No such module "EditAtWikidata". Template:Subscription required
Usage with accessdate parameter:
{{Cricketarchive | accessdate= 25 February 2017 }}- "Sachin Tendulkar". CricketArchive. Retrieved 25 February 2017. Template:Subscription required
Using "id" parameter
URL:
Usage:
{{Cricketarchive | id= 1933 | name= Sachin Tendulkar }}- Sachin Tendulkar at CricketArchiveScript error: No such module "EditAtWikidata". Template:Subscription required
Usage with accessdate parameter:
{{Cricketarchive | id= 1933 | name= Sachin Tendulkar | accessdate= 25 February 2017 }}- "Sachin Tendulkar". CricketArchive. Retrieved 25 February 2017. Template:Subscription required
Using "ref" parameter
URL:
Usage:
{{Cricketarchive | ref= Archive/Grounds/22/1547 | name= Zafar Ali Stadium }}- Zafar Ali Stadium at CricketArchiveScript error: No such module "EditAtWikidata". Template:Subscription required
Usage with ".html" in ref parameter:
{{Cricketarchive | ref= Archive/Grounds/22/1547.html | name= Zafar Ali Stadium }}- Zafar Ali Stadium at CricketArchiveScript error: No such module "EditAtWikidata". Template:Subscription required
Usage with accessdate parameter:
{{Cricketarchive | ref= Archive/Grounds/22/1547 | name= Zafar Ali Stadium | accessdate= 25 February 2017 }}- "Zafar Ali Stadium". CricketArchive. Retrieved 25 February 2017. Template:Subscription required
TemplateData
TemplateData for Cricketarchive
This template displays an external link to a CricketArchive web page. Links to cricket player profiles are created with the "id" parameter and links to other pages are created with the "ref" parameter. It is intended for use in the external links section of an article.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| id | id | The "id" parameter should contain the ID number in the URL for the player's profile. Example: 1933 is the "id" in https://cricketarchive.com/Archive/Players/1/1933/1933.html. It is required when not using the "ref" parameter or the Wikidata property.
| 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 "https://cricketarchive.com/" and ".html". Example: Archive/Grounds/22/1547 is the "ref" portion of https://cricketarchive.com/Archive/Grounds/22/1547.html. It is required when not using the "id" parameter or the Wikidata property. | 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)".
| 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. | Date | optional |
Tracking category
- Category:Cricketarchive maintenance (0) – handles multiple maintenance issues using category sort keys:
1: pages using template with unnamed parameter 12: pages using template with unnamed parameter 2
See also
{{Cricinfo}}, which uses a similar format{{Yahoo! Cricket}}, which uses a similar format