Difference between revisions of "Template:Infobox horseraces"

From blackwiki
Jump to navigation Jump to search
imported>Frietjes
(use default body style)
imported>Frietjes
(Category:Pages using infobox horseraces using deprecated parameters for duplicate grass/turf/dirt in track field)
Line 1: Line 1:
 
{{Infobox
 
{{Infobox
| above = ''{{{class}}} race'' {{#if:{{{last run|}}}|<small>''(discontinued)''</small>}}
+
| above = {{#if:{{{class|}}}|{{{class}}} race {{#if:{{{last run|}}}|<small>(discontinued)</small>}}}}
  
 
| subheaderstyle = font-size:125%; font-weight:bold;
 
| subheaderstyle = font-size:125%; font-weight:bold;
 
| subheaderclass = fn
 
| subheaderclass = fn
| subheader = {{{horse race}}}
+
| subheader = {{ifempty|{{{horse race|}}}|<includeonly>{{PAGENAME}}</includeonly>}}
  
| abovestyle = font-size:110%; background:#{{#switch:{{lc:{{{surface}}}}}|grass|turf=77DD77|DACAA5}}
+
| abovestyle = font-size:110%; font-style:italic; background:#{{#switch:{{lc:{{{surface}}}}}|grass|turf=77DD77|DACAA5}}
 
| headerstyle = background:#{{#switch:{{lc:{{{surface}}}}}|grass|turf=77DD77|DACAA5}}
 
| headerstyle = background:#{{#switch:{{lc:{{{surface}}}}}|grass|turf=77DD77|DACAA5}}
  
Line 13: Line 13:
  
 
| label1 = Location
 
| label1 = Location
| data1 = {{{location}}}  
+
| data1 = {{{location|}}}  
  
 
| label2 = Inaugurated
 
| label2 = Inaugurated
| data2 = {{{inaugurated<includeonly>|</includeonly>}}}
+
| data2 = {{{inaugurated|}}}
  
 
| label3 = Last run
 
| label3 = Last run
| data3 = {{{last run<includeonly>|</includeonly>}}}
+
| data3 = {{{last run|}}}
  
 
| label4 = Race type
 
| label4 = Race type
| data4 = {{{race type}}}
+
| data4 = {{{race type|}}}
  
 
| label5 = Sponsor
 
| label5 = Sponsor
| data5 = {{{sponsor<includeonly>|</includeonly>}}}
+
| data5 = {{{sponsor|}}}
  
 
| label6 = Website
 
| label6 = Website
| data6 = {{{website<includeonly>|</includeonly>}}}
+
| data6 = {{{website|}}}
  
| header10 = Race information
+
| header10 = {{#if:{{{distance|}}}{{{record|}}}{{{surface|}}}{{{track|}}}{{{qualification|}}}{{{weight|}}}{{{purse|}}}{{{bonuses|}}}|Race information}}
  
 
| label11 = Distance
 
| label11 = Distance
| data11 = {{{distance}}}  
+
| data11 = {{{distance|}}}  
  
 
| label12 = Record
 
| label12 = Record
| data12 = {{{record<includeonly>|</includeonly>}}}
+
| data12 = {{{record|}}}
  
 
| label13 = Surface
 
| label13 = Surface
| data13 = {{{surface<includeonly>|</includeonly>}}}
+
| data13 = {{{surface|}}}
  
 
| label14 = Track
 
| label14 = Track
 
| data14 = {{#switch:{{lc:{{{surface|}}}}}
 
| data14 = {{#switch:{{lc:{{{surface|}}}}}
   | grass | turf = {{#invoke:string|replace|{{#invoke:string|replace|{{{track<includeonly>|</includeonly>}}}|^[Gg]rass[, ]*||plain=false}}|^[Tt]urf[, ]*||plain=false}}
+
   | grass | turf = {{#invoke:string|replace|{{#invoke:string|replace|{{{track|}}}|^[Gg]rass[, ]*||plain=false}}|^[Tt]urf[, ]*||plain=false}}
   | dirt = {{#invoke:string|replace|{{{track<includeonly>|</includeonly>}}}|^[Dd]irt[, ]*||plain=false}}
+
   | dirt = {{#invoke:string|replace|{{{track|}}}|^[Dd]irt[, ]*||plain=false}}
   | #default = {{{track<includeonly>|</includeonly>}}}
+
   | #default = {{{track|}}}
 
   }}
 
   }}
  
 
| label15 = Qualification
 
| label15 = Qualification
| data15 = {{{qualification}}}
+
| data15 = {{{qualification|}}}
  
 
| label16 = Weight
 
| label16 = Weight
| data16 = {{{weight<includeonly>|</includeonly>}}}
+
| data16 = {{{weight|}}}
  
 
| label17 = Purse
 
| label17 = Purse
| data17 = {{{purse<includeonly>|</includeonly>}}}
+
| data17 = {{{purse|}}}
  
 
| label18 = Bonuses
 
| label18 = Bonuses
| data18 = {{{bonuses<includeonly>|</includeonly>}}}
+
| data18 = {{{bonuses|}}}
}}<noinclude>
+
}}<!-- tracking
 +
-->{{#switch:{{lc:{{{surface|}}}}}
 +
  | grass | turf = {{#ifeq:{{#invoke:string|replace|{{#invoke:string|replace|{{{track|}}}|.*[Gg]rass[, ]*.*|1|plain=false}}|.*[Tt]urf[, ]*.*|1|plain=false}}|1|[[Category:Pages using infobox horseraces using deprecated parameters]]}}
 +
  | dirt = {{#ifeq:{{#invoke:string|replace|{{{track|}}}|.*[Dd]irt[, ]*.*|1|plain=false}}|1|[[Category:Pages using infobox horseraces using deprecated parameters]]}}
 +
  | #default =
 +
  }}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 13:58, 10 June 2014

Script error: No such module "If empty".

[[Category:Infobox templates|Template:Remove first word]]

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

Usage

{{{class}}} race (discontinued)
Script error: No such module "If empty".
[[File:{{{image}}}|frameless]]
{{{caption}}}
Location{{{location}}}
Inaugurated{{{inaugurated}}}
Last run{{{last run}}}
Race type{{{race type}}}
Sponsor{{{sponsor}}}
Website{{{website}}}
Race information
Distance{{{distance}}}
Record{{{record}}}
Surface{{{surface}}}
Track{{{track}}}
Qualification{{{qualification}}}
Weight{{{weight}}}
Purse{{{purse}}}
Bonuses{{{bonuses}}}
[[Category:Infobox templates|Template:Remove first word]]
{{Infobox horseraces
| class         = 
| horse race    = 
| image         = 
| caption       = 
| location      = 
| inaugurated   = <!-- {{Start date|YYYY|MM|DD|df=y}} -->
| last run      = 
| race type     = 
| sponsor       = 
| website       = 
| distance      = 
| record        = 
| surface       = <!-- Turf / Dirt / Synthetic -->
| track         = <!-- Right-handed / Left-handed / Straight -->
| qualification = 
| weight        = 
| purse         = 
| bonuses       = 
}}

Parameters

Separate multiple values using {{Plainlist}} or {{Flatlist}}.

class
horse race
image
caption
location
inaugurated
Use {{Start date}}
last run
race type
sponsor
website
distance
record
surface
Turf / Dirt
track
Right-handed / Left-handed / Straight
qualification 
weight
purse
bonuses

Example

Grade I race
Script error: No such module "If empty".
Belmont8 1999-05.jpg
The final and longest leg of the United States Triple Crown
LocationBelmont Park
Elmont, New York
InauguratedTemplate:Start date and age
Race typeThoroughbred
WebsiteTemplate:URL
Race information
Distance1 12 miles (12 furlongs)
Record2:24, Secretariat (1973)
SurfaceDirt
TrackLeft-handed
Qualification3-year-olds
WeightColt/Gelding: 126 pounds (57 kg); Filly: 121 pounds (55 kg)
PurseUS$1.5 million
1st: $800,000
[[Category:Infobox templates|Template:Remove first word]]
{{Infobox horseraces
|class         = Grade I
|horse race    = Belmont Stakes
|image         = [[File:Belmont8 1999-05.jpg|235px]]
|caption       = The final and longest leg of the United States Triple Crown
|location      = [[Belmont Park]]<br /> [[Elmont, New York|Elmont]], [[New York (state)|New York]] 
|inaugurated   = {{start date and age|1867|p=y}}
|race type     = Thoroughbred
|website       = {{URL|http://www.belmontstakes.com/}}
|distance      = {{convert|1+1/2|mi|furlong}}
|record        = 2:24, [[Secretariat (horse)|Secretariat]] ([[1973 Belmont Stakes|1973]])
|surface       = Dirt
|track         = Left-handed
|qualification = 3-year-olds
|weight        = [[Colt (horse)|Colt]]/[[Gelding]]: {{convert|126|lb}}; [[Filly]]: {{convert|121|lb}}
|purse         = US$1.5 million <br/> 1st: $800,000
|bonuses       = 
}}

Tracking category