Difference between revisions of "Template:Infobox racecourse"

From blackwiki
Jump to navigation Jump to search
imported>This, that and the other
(Races -> races)
imported>Thumperward
(convert to {{infobox}} for clarity of code and ease of maintenance. if there are any issues with this code drop, before reverting please let me know and I'll try to fix them quickly)
Line 1: Line 1:
{| class="infobox vcard" style="font-size:90%;width:22em;"
+
{{ infobox
|- class="adr"
+
| bodyclass  = vcard
! class="fn org extended-address" style="font-size:110%;text-align:center;background:#DEDEE2;" colspan="2" | {{{Name|{{{name|{{PAGENAME}}}}}}}}
+
| titleclass = adr fn org extended-address
|-
+
| title      = {{{Name|{{{name|<includeonly>{{PAGENAME}}</includeonly>}}}}}}
{{#if:{{{Image|{{{image|}}}}}} |
+
| image     = {{{Image|{{{image|}}}}}}
{{!}} colspan="2" style="font-size:90%;text-align:center;padding-bottom:.5em;" {{!}} {{{Image|{{{image|}}}}}}{{#if:{{{Caption|{{{caption|}}}}}}|<br />{{{Caption|{{{caption}}}}}}}}
+
| caption   = {{{Caption|{{{caption|}}}}}}
{{!}}-
+
 
}}
+
| label1    = Location
{{#if:{{{Website|{{{website|}}}}}} |
+
| class1    = label
{{!}} colspan="2" style="text-align:center;" {{!}} [{{{Website|{{{website|}}}}}} Official website]
+
| data1      = {{{Location|{{{location|}}}}}}
{{!}}-
+
| label2    = [[Geographic coordinate system|Coordinates]]
}}
+
| data2      = {{{Coordinates|{{{coordinates|}}}}}}
|-
+
| label3    = Owned by
| '''Location'''
+
| data3      = {{{Owner|{{{owner|}}}}}}
| <span class="label">{{{Location|{{{location}}}}}}</span>
+
| label4    = Date opened
|-
+
| data4      = {{{Opened|{{{opened|}}}}}}
{{#if:{{{Coordinates|{{{coordinates|}}}}}}|
+
| label5    = Date closed
{{!}} '''[[Geographic coordinate system|Coordinates]]'''
+
| data5      = {{{Closed|{{{closed|}}}}}}
{{!}} {{{Coordinates|{{{coordinates}}}}}}
+
| label6    = Capacity
{{!}}-
+
| data6      = {{{Capacity|{{{capacity|}}}}}}
}}
+
| label7    = Screened on
{{#if:{{{Owner|{{{owner|}}}}}}|
+
| data7      = {{{Channel|{{{channel|}}}}}}
{{!}} '''Owned by'''
+
| label8    = Race type
{{!}} {{{Owner|{{{owner}}}}}}
+
| data8      = {{{RaceType|{{{racetype|}}}}}}
{{!}}-
+
| label9    = Course type
}}
+
| class9    = category
{{#if:{{{Opened|{{{opened|}}}}}}|
+
| data9      = {{{CourseType|{{{coursetype|}}}}}}
{{!}} '''Date opened'''
+
| label10    = Notable races
{{!}} {{{Opened|{{{opened}}}}}}
+
| data10    = {{{NotableRaces|{{{notableraces|}}}}}}
{{!}}-
+
 
}}
+
| below      = {{#if:{{{Website|{{{website|}}}}}}|{{official|{{{Website|{{{website|}}}}}}}}}}
{{#if:{{{Closed|{{{closed|}}}}}}|
+
}}<noinclude>{{documentation}}<!-- place category and language links on the /doc sub-page, not here --></noinclude>
{{!}} '''Date closed'''
 
{{!}} {{{Closed|{{{closed}}}}}}
 
{{!}}-
 
}}
 
{{#if:{{{Capacity|{{{capacity|}}}}}}|
 
{{!}} '''Capacity'''
 
{{!}} {{{Capacity|{{{capacity}}}}}}
 
{{!}}-
 
}}
 
{{#if:{{{Channel|{{{channel|}}}}}}|
 
{{!}} '''Screened on'''
 
{{!}} {{{Channel|{{{channel}}}}}}
 
{{!}}-
 
}}
 
{{#if:{{{RaceType|{{{racetype|}}}}}}|
 
{{!}} '''Race type'''
 
{{!}} {{{RaceType|{{{racetype}}}}}}
 
{{!}}-
 
}}
 
{{#if:{{{CourseType|{{{coursetype|}}}}}}|
 
{{!}} '''Course type'''
 
{{!}} <span class="category">{{{CourseType|{{{coursetype}}}}}}</span>
 
{{!}}-
 
}}
 
{{#if:{{{NotableRaces|{{{notableraces|}}}}}}|
 
{{!}} '''Notable races'''
 
{{!}} {{{NotableRaces|{{{notableraces}}}}}}
 
{{!}}-
 
}}
 
|}<noinclude>{{documentation}}</noinclude>
 

Revision as of 20:53, 1 November 2011

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

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

Usage

Template:Parameter names example

{{Infobox racecourse
| name         = <!-- REQUIRED -->
| logo         = 
| logo_size    = 
| logo_alt     = 
| logo_caption = 
| image        = 
| image_size   = 
| alt          = 
| caption      = 
| location     = <!-- REQUIRED -->
| coordinates  = <!-- use {{Coord}} -->
| owner        = 
| operator     = 
| opened       = 
| closed       = 
| capacity     = 
| channel      = 
| racetype     = 
| coursetype   = 
| notableraces = 
| handle       = 
| attendance   = 
| website      = <!-- http://example.com -->
}}

Example

Aintree Racecourse
Aintree Racecourse in 2006.jpg
The racecourse in 2006
LocationAintree, Merseyside, England
CoordinatesLua error: callParserFunction: function "#coordinates" was not found.
Owned byJockey Club Racecourses
Date opened7 July 1829
Screened onRacing UK
Course typeNational Hunt
Notable racesGrand National
Template:Official
[[Category:Infobox templates|Template:Remove first word]]
{{Infobox racecourse
| name         = Aintree Racecourse
| logo         = Aintree Racecourse Logo.jpg
| image        = Aintree Racecourse in 2006.jpg
| caption      = The racecourse in 2006
| location     = [[Aintree]], [[Merseyside]], England
| coordinates  = {{coord|53|28|37|N|2|56|30|W|type:landmark_region:GB|display=inline,title}}
| owner        = [[Jockey Club]] Racecourses
| operator     = 
| opened       = 7 July 1829
| closed       = 
| capacity     = 
| channel      = [[Racing UK]]
| racetype     = 
| coursetype   = [[National Hunt]]
| notableraces = [[Grand National]]
| handle       = 
| attendance   = 
| website      = http://aintree.thejockeyclub.co.uk
}}

Microformat

Template:UF-hcard-geo

Tracking category