Difference between revisions of "Template:Cricket graph requests/doc"

From blackwiki
Jump to navigation Jump to search
imported>Extra999
imported>Extra999
Line 8: Line 8:
 
== Parameters ==
 
== Parameters ==
  
For the sake of this tutorial, headers have been disabled from the template using {{para|header|no}}.
+
For this tutorial, headers have been disabled from the template using {{para|header|no}}.
  
 
=== name ===
 
=== name ===
Line 25: Line 25:
 
*set to "all" produces:
 
*set to "all" produces:
 
{{CGR|Example|all|header=no}}
 
{{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}} or {{para|format_2}} or {{para|format2}} (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|header=no}}
 
{{CGR|name=Example|format=test|format 2=odi|header=no}}
Line 36: Line 36:
  
 
=== usage ===
 
=== usage ===
{{para|usage|suspend}} produces {{CGR|usage=suspend}}
+
{{para|usage|suspend}} produces {{CGR|usage=suspend}} In this parameter, the header function is disabled.
 
*a {{para|reason}} or {{para|1}} can be specified, producing {{CGR|usage=suspend|reason=Reason}}
 
*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}}
 
*a {{para|fixture}} can be specified, producing {{CGR|usage=suspend|fixture=Fixture}}
 +
For example,
 +
:<nowiki>:</nowiki>[indent] <code><nowiki>{{CGR|usage=suspend|reason=Example}}</nowiki></code> would produce:
 +
{{CGR|usage=suspend|reason=Example reason}}
  
 
== Examples ==
 
== Examples ==

Revision as of 03:35, 7 June 2012


This template is used at WP:CRIC/GR.

Parameters

For 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

format

|format= or |2=:

  • set to "test", "Test", "tests" or "Tests" produces [without header]:
  1. REDIRECT Template:WikiProject Classical Greece and Rome
  • set to "odi", "ODI", "odis" or "ODIs" produces:
  1. REDIRECT Template:WikiProject Classical Greece and Rome
  • set to "T20I", "t20i", "t20is" or "T20Is" produces:
  1. REDIRECT Template:WikiProject Classical Greece and Rome
  • set to "all" produces:
  1. REDIRECT Template:WikiProject Classical Greece and Rome
  • two formats can be added, using |format 2= or |format_2= or |format2= (except for "all", which already includes all possibilities)
  • say, {{CGR|name=Example|format=test|format 2=odi}} would produce:
  1. REDIRECT Template:WikiProject Classical Greece and Rome

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

  1. REDIRECT Template:WikiProject Classical Greece and Rome In this parameter, the header function is disabled.
  • a |reason= or |1= can be specified, producing
  1. REDIRECT Template:WikiProject Classical Greece and Rome
  • a |fixture= can be specified, producing
  1. REDIRECT Template:WikiProject Classical Greece and Rome

For example,

:[indent] {{CGR|usage=suspend|reason=Example}} would produce:
  1. REDIRECT Template:WikiProject Classical Greece and Rome

Examples

In the following examples, the header has not been disabled.

  • {{CGR|Example|T20I|note}} would produce:
  1. REDIRECT Template:WikiProject Classical Greece and Rome
  • {{CGR|link=Ross Taylor|name=Taylor, Ross|format=Test|format 2=ODI|cricinfoid=38699|note=Note for Taylor}} would produce:
  1. REDIRECT Template:WikiProject Classical Greece and Rome
  • if no parameters are specified whatsoever, the template produces an error message. thus, {{CGR}} alone would produce:
  1. REDIRECT Template:WikiProject Classical Greece and Rome