Difference between revisions of "Template:Infobox horseraces"

From blackwiki
Jump to navigation Jump to search
imported>Plastikspork
(Closed)
imported>Frietjes
m
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{| class="infobox" style="width:24em;font-size:90%;text-align:left;"
+
{{Infobox
|-
+
| title = {{if empty|{{{horse race|}}}|<includeonly>{{PAGENAMEBASE}}</includeonly>}}
!colspan="2" style="font-size:110%;text-align:center;background:#{{#switch:{{lc:{{{surface}}}}}|turf=77DD77|DACAA5}};"|''{{{class}}} race''{{#if:{{{last run|}}}|<small>'' (discontinued)''</small>|}}
 
|-
 
!colspan="2" style="font-size:125%;text-align:center;"|{{{horse race}}}
 
|-
 
|colspan="2" style="font-size:90%;text-align:center;padding-bottom:.5em;"|{{#if:{{{image|}}}|{{{image}}}<br />{{{caption}}}|}}
 
|-
 
|'''Location'''
 
|{{{location}}}
 
|-
 
{{#if: {{{inaugurated<includeonly>|</includeonly>}}}|
 
{{!}}'''Inaugurated'''
 
{{!}}{{{inaugurated}}}}}
 
|-
 
{{#if: {{{last run<includeonly>|</includeonly>}}}|
 
{{!}}'''Last run'''
 
{{!}}{{{last run}}}}}
 
|-
 
|'''Race type'''
 
|{{{race type}}}
 
|-
 
{{#if: {{{sponsor<includeonly>|</includeonly>}}}|
 
{{!}}'''Sponsor'''
 
{{!}}{{{sponsor}}}}}
 
|-
 
{{#if: {{{website<includeonly>|</includeonly>}}}|
 
{{!}}'''Website'''
 
{{!}}{{{website}}}}}
 
|-
 
!colspan="2" style="text-align:center;background:#{{#switch:{{lc:{{{surface}}}}}|turf=77DD77|DACAA5}};"| Race information
 
|-
 
|'''Distance'''
 
|{{{distance}}}
 
|-
 
{{#if: {{{record<includeonly>|</includeonly>}}}|
 
{{!}}'''Record'''
 
{{!}}{{{record}}}}}
 
|-
 
{{#if: {{{surface<includeonly>|</includeonly>}}}|
 
{{!}}'''Surface'''
 
{{!}}{{{surface}}}}}
 
|-
 
{{#if: {{{track<includeonly>|</includeonly>}}}|
 
{{!}}'''Track'''
 
{{!}}{{{track}}}}}
 
|-
 
|'''Qualification'''
 
|{{{qualification}}}
 
|-
 
{{#if: {{{weight<includeonly>|</includeonly>}}}|
 
{{!}}'''Weight'''
 
{{!}}{{{weight}}}}}
 
|-
 
{{#if: {{{purse<includeonly>|</includeonly>}}}|
 
{{!}}'''Purse'''
 
{{!}}{{{purse}}}}}
 
|-
 
{{#if: {{{bonuses<includeonly>|</includeonly>}}}|
 
{{!}}'''Bonuses'''
 
{{!}}{{{bonuses}}}}}
 
|}<noinclude>
 
  
== Usage ==
+
| subheader = {{#if:{{{class|}}}|{{{class}}} race {{#if:{{{last run|}}}|<small>(discontinued)</small>}}}}
<pre>{{Infobox horserace
+
| subheaderstyle = font-size:110%; font-style:italic; background:#{{#switch:{{lc:{{{surface}}}}}|grass|turf=77DD77|synthetic|dirt|#default=DACAA5}}
| class        =  
+
 
| horse race    =  
+
| headerstyle = background:#{{#switch:{{lc:{{{surface}}}}}|grass|turf=77DD77|synthetic|dirt|#default=DACAA5}}
| image         =  
+
 
| caption       =  
+
| image = {{#invoke:InfoboxImage|InfoboxImage|image = {{{image|}}} | size = {{{image size|}}} | sizedefault = frameless | alt = {{{image alt|}}} }}
| location     =  
+
| caption = {{{caption|}}}
| inaugurated   =  
+
 
| last run     =  
+
| label1 = Location
| race type     =  
+
| data1 = {{{location|}}}
| sponsor       =  
+
 
| website       =  
+
| label2 = Inaugurated
| distance     =  
+
| data2 = {{{inaugurated|}}}
| record       =  
+
 
| surface       =  
+
| label3 = Last run
| track         =  
+
| data3 = {{{last run|}}}
| qualification =  
+
 
| weight       =  
+
| label4 = Race type
| purse         =  
+
| data4 = {{{race type|}}}
| bonuses       =
+
 
}}</pre>
+
| label5 = Sponsor
[[Category:Horse racing templates]]
+
| data5 = {{{sponsor|}}}
[[Category:Sports infobox templates|Horserace]]
+
 
 +
| label6 = Website
 +
| data6 = {{{website|}}}
 +
 
 +
| header10 = {{#if:{{{distance|}}}{{{record|}}}{{{surface|}}}{{{track|}}}{{{qualification|}}}{{{weight|}}}{{{purse|}}}{{{bonuses|}}}|Race information}}
 +
 
 +
| label11 = Distance
 +
| data11 = {{{distance|}}}
 +
 
 +
| label12 = Record
 +
| data12 = {{{record|}}}
 +
 
 +
| label13 = Surface
 +
| data13 = {{{surface|}}}{{{surface_note|}}}
 +
 
 +
| label14 = Track
 +
| data14 = {{{track|}}}
 +
 
 +
| label15 = Qualification
 +
| data15 = {{{qualification|}}}
 +
 
 +
| label16 = Weight
 +
| data16 = {{{weight|}}}
 +
 
 +
| label17 = Purse
 +
| data17 = {{{purse|}}}
 +
 
 +
| label18 = Bonuses
 +
| data18 = {{{bonuses|}}}
 +
}}<!-- tracking
 +
-->{{#ifeq:{{#invoke:string|replace|{{#invoke:string|replace|{{#invoke:string|replace|{{#invoke:string|replace|{{{track|}}}|.*[Gg]rass[, ]*.*|1|plain=false}}|.*[Tt]urf[, ]*.*|1|plain=false}}|.*[Dd]irt[, ]*.*|1|plain=false}}|.*[Pp]oly[, ]*.*|1|plain=false}}|1|[[Category:Pages using infobox horseraces with unknown parameters|σ{{PAGENAME}}]]
 +
}}{{#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using infobox horseraces with unknown parameters|_VALUE_{{PAGENAME}}]]
 +
| horse race | class | image | image size | image alt | caption | location | last run | inaugurated | race type | sponsor | website | distance | record | surface | surface_note | track | qualification | weight | purse | bonuses }}<noinclude>
 +
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 12:07, 11 October 2019

Script error: No such module "If empty".

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

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

Usage

Script error: No such module "If empty".
{{{class}}} race (discontinued)
[[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

Script error: No such module "If empty".
Grade I race
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