Difference between revisions of "Template:Cricket graph requests/doc"
Jump to navigation
Jump to search
imported>Benzband m (headers) |
imported>Benzband (update) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- Categories and interwikis go at the bottom of this page. --> | <!-- Categories and interwikis go at the bottom of this page. --> | ||
| + | |||
| + | __NOTOC__ | ||
This template is used at [[WP:CRIC/GR]]. | This template is used at [[WP:CRIC/GR]]. | ||
| Line 6: | Line 8: | ||
== Parameters == | == Parameters == | ||
| − | + | For the sake of this tutorial, headers have been disabled from the template using {{para|header|no}}. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | === name === | |
| + | *{{para|name}} or {{para|1}} for defining the name | ||
| + | *{{para|link}} and {{para|name}} for defining a link if different from the name (as in <tt><nowiki>[[</nowiki><u>link</u><nowiki>|name]]</nowiki></tt>) | ||
| + | **the header, which normally displays the defined name, can be disabled by inserting {{para|header|no}} | ||
| + | |||
| + | === format === | ||
{{para|format}} or {{para|2}}: | {{para|format}} or {{para|2}}: | ||
| − | *set to "test", "Test", "tests" or "Tests" produces: | + | *set to "test", "Test", "tests" or "Tests" produces: {{CGR|Example|test|header=no}} |
| − | {{CGR|Example|test}} | ||
* set to "odi", "ODI", "odis" or "ODIs" produces: | * set to "odi", "ODI", "odis" or "ODIs" produces: | ||
| − | {{CGR|Example|odi}} | + | {{CGR|Example|odi|header=no}} |
* set to "T20I", "t20i" or "T20Is" produces: | * set to "T20I", "t20i" or "T20Is" produces: | ||
| − | {{CGR|Example|T20I}} | + | {{CGR|Example|T20I|header=no}} |
*set to "all" produces: | *set to "all" produces: | ||
| − | {{CGR|Example|all}} | + | {{CGR|Example|all|header=no}} |
*two formats can be added, using {{para|format 2}} (except for "all", which already includes all possibilities) | *two formats can be added, using {{para|format 2}} (except for "all", which already includes all possibilities) | ||
*say, <code><nowiki>{{CGR|name=Example|format=test|format 2=odi}}</nowiki></code> would produce: | *say, <code><nowiki>{{CGR|name=Example|format=test|format 2=odi}}</nowiki></code> would produce: | ||
| − | {{CGR|name=Example|format=test|format 2=odi}} | + | {{CGR|name=Example|format=test|format 2=odi|header=no}} |
| − | + | === cricinfo id === | |
| − | {{para|cricinfoid}} for defining a [[Cricinfo]] player id external link | + | *{{para|cricinfoid}} for defining a [[Cricinfo]] player id external link (as in <tt><nowiki>http://www.espncricinfo.com/ci/content/player/</nowiki><u>cricinfoid</u><nowiki>.html</nowiki></tt>) |
| − | + | === note === | |
{{para|note}} or {{para|3}} for leaving an additional note or signature | {{para|note}} or {{para|3}} for leaving an additional note or signature | ||
| − | + | === usage === | |
{{para|usage|suspend}} produces {{CGR|usage=suspend}} | {{para|usage|suspend}} produces {{CGR|usage=suspend}} | ||
| − | *a {{para|reason}} can be specified | + | *a {{para|reason}} or {{para|1}} can be specified, producing {{CGR|usage=suspend|reason=Reason}} |
| + | *a {{para|fixture}} can be specified, producing {{CGR|usage=suspend|fixture=Fixture}} | ||
== Examples == | == Examples == | ||
| + | |||
| + | In the following examples, the header has not been disabled. | ||
*<code><nowiki>{{CGR|Example|T20I|note}}</nowiki></code> would produce: | *<code><nowiki>{{CGR|Example|T20I|note}}</nowiki></code> would produce: | ||
| Line 44: | Line 49: | ||
{{CGR|link=Ross Taylor|name=Taylor, Ross|format=Test|format 2=ODI|cricinfoid=38699|note=Note for Taylor}} | {{CGR|link=Ross Taylor|name=Taylor, Ross|format=Test|format 2=ODI|cricinfoid=38699|note=Note for Taylor}} | ||
| − | *if no parameters are specified whatsoever, the template produces an error message. thus, <code><nowiki>{{CGR}}</nowiki></code> alone would produce: | + | *if no parameters are specified whatsoever, the template produces an error message. thus, <code><nowiki>{{CGR}}</nowiki></code> alone would produce: {{CGR}} |
| − | {{CGR}} | ||
<includeonly> | <includeonly> | ||
Revision as of 08:58, 3 June 2012
| This is a documentation subpage for Template:Cricket graph requests. It contains usage information, categories and other content that is not part of the original template page. |
This template is used at WP:CRIC/GR.
Parameters
For the sake of this tutorial, headers have been disabled from the template using |header=no.
name
|name=or|1=for defining the name|link=and|name=for defining a link if different from the name (as in [[link|name]])- the header, which normally displays the defined name, can be disabled by inserting
|header=no
- the header, which normally displays the defined name, can be disabled by inserting
format
|format= or |2=:
- set to "test", "Test", "tests" or "Tests" produces:
- set to "odi", "ODI", "odis" or "ODIs" produces:
- set to "T20I", "t20i" or "T20Is" produces:
- set to "all" produces:
- two formats can be added, using
|format 2=(except for "all", which already includes all possibilities) - say,
{{CGR|name=Example|format=test|format 2=odi}}would produce:
cricinfo id
|cricinfoid=for defining a Cricinfo player id external link (as in http://www.espncricinfo.com/ci/content/player/cricinfoid.html)
note
|note= or |3= for leaving an additional note or signature
usage
|usage=suspend produces
- a
|reason=or|1=can be specified, producing
- a
|fixture=can be specified, producing
Examples
In the following examples, the header has not been disabled.
{{CGR|Example|T20I|note}}would produce:
{{CGR|link=Ross Taylor|name=Taylor, Ross|format=Test|format 2=ODI|cricinfoid=38699|note=Note for Taylor}}would produce:
- if no parameters are specified whatsoever, the template produces an error message. thus,
{{CGR}}alone would produce: