Difference between revisions of "Template:Infobox rail/doc"

From blackwiki
Jump to navigation Jump to search
imported>Edgepedia
(→‎See also: +Template:Infobox rail line)
imported>Edgepedia
(improve documentation)
Line 4: Line 4:
  
 
== Usage ==
 
== Usage ==
{{tl|Infobox rail}} is used to create an [[Wikipedia:Infobox|infobox]] on articles about railway '''companies'''. The <tt>railroad_name</tt>, <tt>locale</tt> and <tt>gauge</tt> parameters are mandatory for this template.
+
{{tl|Infobox rail}} is used to create an [[Wikipedia:Infobox|infobox]] on articles about railway '''companies'''; <tt>railroad_name</tt> is the only mandatory parameter. {{tl:Infobox rail line}} is used for railway '''lines'''; This template is sometimes used on articles about both a company and a line.
  
 
For railways that operate on [[standard gauge]] tracks or for former railways that operated on standard gauge tracks, {{tl|Infobox SG rail}} uses this template but fills in the <tt>gauge</tt> parameter automatically.
 
For railways that operate on [[standard gauge]] tracks or for former railways that operated on standard gauge tracks, {{tl|Infobox SG rail}} uses this template but fills in the <tt>gauge</tt> parameter automatically.
Line 14: Line 14:
 
|logo_filename    =  
 
|logo_filename    =  
 
|logo_size        =  
 
|logo_size        =  
 +
|logo_alt          =
 
|system_map        =  
 
|system_map        =  
 
|map_caption      =  
 
|map_caption      =  
 
|map_size          =  
 
|map_size          =  
|marks            =  
+
|map_alt          =
 
|image            =  
 
|image            =  
 
|image_size        =  
 
|image_size        =  
 
|image_caption    =  
 
|image_caption    =  
 +
|image_alt        =
 +
|marks            =
 
|locale            =  
 
|locale            =  
 
|start_year        = <!-- {{Start date|YYYY}} -->
 
|start_year        = <!-- {{Start date|YYYY}} -->
Line 35: Line 38:
 
</pre>
 
</pre>
  
== Parameters ==
+
==Parameters==
 +
{| class="wikitable"
 +
|-
 +
! Parameter || Required || Definition
 +
|-
 +
| <code>railroad_name</code> || '''Yes''' || Name of railway company, displayed at top of infobox
 +
|-
 +
| <code>logo_filename</code> || No || Filename of logo image, without <code>File:</code> prefix. Shown just below the railroad name
 +
|-
 +
| <code>logo_size</code> || No || Size of image in pixels with '''px''', default is <code>upright=0.91</code> (see [[Wikipedia:Picture tutorial#Upright images]])
 +
|-
 +
| <code>logo_alt</code> || No || Alt text for logo, used by screen readers. See [[Wikipedia:Alternative text for images]] for more information.
 +
|-
 +
| <code>system_map</code> || No ||  Filename of system map image, without <code>File:</code> prefix, displayed below the logo.
 +
|-
 +
| <code>map_caption</code> || No || Caption for system map image
 +
|-
 +
| <code>map_size</code> || No || Size of image in pixels with '''px''', default is <code>upright=1.41</code>
 +
|-
 +
| <code>map_alt</code> || No || Alt text for map
 +
|-
 +
| <code>image</code> || No || Filename of image, without <code>File:</code> prefix, displayed below the map
 +
|-
 +
| <code>image_size</code> || No || Size of image in pixels with '''px''', default is <code>upright=1.41</code>
 +
|-
 +
| <code>image_caption</code> || No || Image caption
 +
|-
 +
| <code>image_alt</code> || No || Alt text for image
 +
|-
 +
| <code>marks</code> || No || [[Reporting mark]], used only for North American railroad companies.
 +
|-
 +
| <code>locale</code> || No || Region railway is located
 +
|-
 +
| <code>coordinates</code> || No || Coordinates; use {{Tl|Coord}} with {{Para|display|inline,title}}
 +
|-
 +
| <code>start_year</code> || No || Date railway opened, use {{tl|Start date}} template, Using <code>df=y</code> parameter to display in day month year format if appropriate. Shown as '''Dates of operation'''
 +
|-
 +
| <code>end_year</code> || No || Date railway closed, use {{tl|End date}} template. Shown as '''Dates of operation'''
 +
|-
 +
| <code>predecessor_line</code> || No || Used to list the companies that were merged to make up this company.
 +
|-
 +
| <code>successor_line</code> || No || Subsequent railway company that operated the company's railway lines
 +
|-
 +
| <code>gauge</code> || No || [[Track gauge]] (use template {{tl|RailGauge}})
 +
|-
 +
| <code>old_gauge</code> || No || Old rail gauge (use template {{tl|RailGauge}})
 +
|-
 +
| <code>electrification</code> || No || Electrification system, if appropriate
 +
|-
 +
| <code>length</code> || No || Length of the railway system
 +
|-
 +
| <code>hq_city</code> || No || Locale of the company's headquarters.
 +
|-
 +
| <code>website</code> || No || Website, use {{tl|URL}} template
 +
|-
 +
|}
 +
 
 +
==Examples==
 +
{| class="wikitable"
 +
|-
 +
! Usage !! Code !! Example
 +
|-
 +
| Minimum use || <pre>{{Infobox rail
 +
|railroad_name=Isle of Sodor Railway
 +
}}</pre> || {{Infobox rail
 +
|railroad_name=Isle of Sodor Railway
 +
}}
 +
|-
 +
| Logo || <pre>{{Infobox rail
 +
| railroad_name=Isle of Sodor Railway
 +
| logo_filename = No-photo.svg
 +
| logo_size = 300px}}</pre> || {{Infobox rail
 +
| railroad_name=Isle of Sodor Railway
 +
| logo_filename = No-logo.svg
 +
| logo_size = 300px}}
 +
|-
 +
| Image || <pre>{{Infobox rail
 +
| railroad_name = Great North of Scotland Railway
 +
| image        = Gordon Highlander steam locomotive.jpg
 +
| image_size    = 300px
 +
| image_caption = No. 49 ''Gordon Highlander'', built
 +
  for the Great North of Scotland Railway in 1920
 +
}}
 +
</pre> || {{Infobox rail
 +
| railroad_name    = Great North of Scotland Railway
 +
| image            = Gordon Highlander steam locomotive.jpg
 +
| image_size        = 300px
 +
| image_caption    = No. 49 ''Gordon Highlander'', built for the Great North of Scotland Railway in 1920
 +
}}
 +
|-
  
;railroad_name :
+
| Text ||<pre>{{Infobox rail
;logo_filename :
+
|railroad_name    = Great North of Iceland Railway
;logo_size :
+
|marks            = FGW
;system_map :
+
|locale            = North Iceland
;map_caption :
+
|start_year        = {{Start date|1906|5|12}}
;map_size :
+
|end_year          = {{End date|1923|1|20}}
;marks :
+
|predecessor_line  =
;image :
+
|successor_line    = North Iceland Railway
;image_size :
+
|gauge            = Standard
;image_caption :
+
|old_gauge        = Narrow
;locale :
+
|electrification  = 650 Vdc
;start_year : Use {{tl|Start date}}
+
|length            = {{convert|50|mi}}
;end_year : Use {{tl|End date}}
+
|hq_city          = Ice Town
;predecessor_line :
+
|website          = {{URL|www.IcelandRailways.com}}
;successor_line :
+
}}</pre> || {{Infobox rail
;gauge :
+
|railroad_name    = Great North of Iceland Railway
;old_gauge :
+
|marks            = FGW
;electrification :
+
|locale            = North Iceland
;length :
+
|start_year        = {{Start date|1906|5|12}}
;hq_city :
+
|end_year          = {{End date|1923|1|20}}
;website : Use {{tl|URL}}
+
|predecessor_line  =
 +
|successor_line    = North Iceland Railway
 +
|gauge            = Standard
 +
|old_gauge        = Narrow
 +
|electrification  = 650 Vdc
 +
|length            = {{convert|50|mi}}
 +
|hq_city          = Ice Town
 +
|website          = {{URL|www.IcelandRailways.com}}
 +
}}
 +
|-
 +
| (Nearly) Everything ||<pre>{{Infobox rail
 +
| railroad_name = Great North of Iceland Railway
 +
| logo_filename = No-photo.svg
 +
| system_map    = Temporary placeholder photo.jpg
 +
| image        = Gordon Highlander steam locomotive.jpg
 +
| image_size    = 300px
 +
| image_caption = No. 49 ''Gordon Highlander'', built
 +
for the Great North of Scotland Railway in 1920
 +
|marks         = FGW
 +
|locale        = North Iceland
 +
|start_year    = {{Start date|1906|5|12}}
 +
|end_year      = {{End date|1923|1|20}}
 +
|predecessor_line=
 +
|successor_line = North Iceland Railway
 +
|gauge          = Standard
 +
|old_gauge      = Narrow
 +
|electrification= 650 Vdc
 +
|length        = {{convert|50|mi}}
 +
|hq_city        = Ice Town
 +
|website        = {{URL|www.IcelandRailways.com}}
 +
}}</pre> ||{{Infobox rail
 +
|railroad_name = Great North of Iceland Railway
 +
|logo_filename = Scan0027.jpg
 +
|system_map    = Temporary placeholder photo.jpg
 +
|image         = Gordon Highlander steam locomotive.jpg
 +
|image_size   = 300px
 +
|image_caption = No. 49 ''Gordon Highlander'', built for
 +
the Great North of Scotland Railway in 1920
 +
|marks          = FGW
 +
|locale         = North Iceland
 +
|start_year     = {{Start date|1906|5|12}}
 +
|end_year       = {{End date|1923|1|20}}
 +
|predecessor_line=
 +
|successor_line = North Iceland Railway
 +
|gauge         = Standard
 +
|old_gauge     = Narrow
 +
|electrification= 650 Vdc
 +
|length         = {{convert|50|mi}}
 +
|hq_city       = Ice Town
 +
|website       = {{URL|www.IcelandRailways.com}}
 +
}}
 +
|}
  
==See also==
 
*[[Template:Infobox rail line]] for railway lines
 
  
 
{{Organization infoboxes}}
 
{{Organization infoboxes}}

Revision as of 16:01, 7 December 2013

Usage

{{Infobox rail}} is used to create an infobox on articles about railway companies; railroad_name is the only mandatory parameter. Template:Tl:Infobox rail line is used for railway lines; This template is sometimes used on articles about both a company and a line.

For railways that operate on standard gauge tracks or for former railways that operated on standard gauge tracks, {{Infobox SG rail}} uses this template but fills in the gauge parameter automatically.

Syntax

{{Infobox rail
|railroad_name     = 
|logo_filename     = 
|logo_size         = 
|logo_alt          =
|system_map        = 
|map_caption       = 
|map_size          = 
|map_alt           =
|image             = 
|image_size        = 
|image_caption     = 
|image_alt         =
|marks             = 
|locale            = 
|start_year        = <!-- {{Start date|YYYY}} -->
|end_year          = <!-- {{End date|YYYY}} -->
|predecessor_line  = 
|successor_line    = 
|gauge             = 
|old_gauge         = 
|electrification   = 
|length            = 
|hq_city           = 
|website           = <!-- {{URL|example.com}} -->
}}

Parameters

Parameter Required Definition
railroad_name Yes Name of railway company, displayed at top of infobox
logo_filename No Filename of logo image, without File: prefix. Shown just below the railroad name
logo_size No Size of image in pixels with px, default is upright=0.91 (see Wikipedia:Picture tutorial#Upright images)
logo_alt No Alt text for logo, used by screen readers. See Wikipedia:Alternative text for images for more information.
system_map No Filename of system map image, without File: prefix, displayed below the logo.
map_caption No Caption for system map image
map_size No Size of image in pixels with px, default is upright=1.41
map_alt No Alt text for map
image No Filename of image, without File: prefix, displayed below the map
image_size No Size of image in pixels with px, default is upright=1.41
image_caption No Image caption
image_alt No Alt text for image
marks No Reporting mark, used only for North American railroad companies.
locale No Region railway is located
coordinates No Coordinates; use {{Coord}} with |display=inline,title
start_year No Date railway opened, use {{Start date}} template, Using df=y parameter to display in day month year format if appropriate. Shown as Dates of operation
end_year No Date railway closed, use {{End date}} template. Shown as Dates of operation
predecessor_line No Used to list the companies that were merged to make up this company.
successor_line No Subsequent railway company that operated the company's railway lines
gauge No Track gauge (use template {{RailGauge}})
old_gauge No Old rail gauge (use template {{RailGauge}})
electrification No Electrification system, if appropriate
length No Length of the railway system
hq_city No Locale of the company's headquarters.
website No Website, use {{URL}} template

Examples

Usage Code Example
Minimum use
{{Infobox rail
|railroad_name=Isle of Sodor Railway
}}
Isle of Sodor Railway
PredecessorScript error: No such module "If empty".
SuccessorScript error: No such module "If empty".
LengthScript error: No such module "If empty".
Logo
{{Infobox rail
| railroad_name=Isle of Sodor Railway
| logo_filename = No-photo.svg
| logo_size = 300px}}
Isle of Sodor Railway
File:No-logo.svg
PredecessorScript error: No such module "If empty".
SuccessorScript error: No such module "If empty".
LengthScript error: No such module "If empty".
Image
{{Infobox rail
| railroad_name = Great North of Scotland Railway
| image         = Gordon Highlander steam locomotive.jpg
| image_size    = 300px
| image_caption = No. 49 ''Gordon Highlander'', built
  for the Great North of Scotland Railway in 1920
}}
Great North of Scotland Railway
300px
No. 49 Gordon Highlander, built for the Great North of Scotland Railway in 1920
PredecessorScript error: No such module "If empty".
SuccessorScript error: No such module "If empty".
LengthScript error: No such module "If empty".
Text
{{Infobox rail
|railroad_name     = Great North of Iceland Railway
|marks             = FGW
|locale            = North Iceland
|start_year        = {{Start date|1906|5|12}}
|end_year          = {{End date|1923|1|20}}
|predecessor_line  = 
|successor_line    = North Iceland Railway
|gauge             = Standard
|old_gauge         = Narrow
|electrification   = 650 Vdc
|length            = {{convert|50|mi}}
|hq_city           = Ice Town
|website           = {{URL|www.IcelandRailways.com}}
}}
Great North of Iceland Railway
Overview
HeadquartersIce Town
Reporting markFGW
LocaleNorth Iceland
Dates of operationMay 12, 1906 (1906-05-12)–January 20, 1923 (1923-01-20)
PredecessorScript error: No such module "If empty".
SuccessorScript error: No such module "If empty".
Technical
Track gaugeStandard
Previous gaugeNarrow
Electrification650 Vdc
LengthScript error: No such module "If empty".
Other
WebsiteTemplate:URL
(Nearly) Everything
{{Infobox rail
| railroad_name = Great North of Iceland Railway
| logo_filename = No-photo.svg
| system_map    = Temporary placeholder photo.jpg
| image         = Gordon Highlander steam locomotive.jpg
| image_size    = 300px
| image_caption = No. 49 ''Gordon Highlander'', built
 for the Great North of Scotland Railway in 1920
|marks          = FGW
|locale         = North Iceland
|start_year     = {{Start date|1906|5|12}}
|end_year       = {{End date|1923|1|20}}
|predecessor_line= 
|successor_line = North Iceland Railway
|gauge          = Standard
|old_gauge      = Narrow
|electrification= 650 Vdc
|length         = {{convert|50|mi}}
|hq_city        = Ice Town
|website        = {{URL|www.IcelandRailways.com}}
}}
Great North of Iceland Railway
File:Scan0027.jpg
File:Temporary placeholder photo.jpg
300px
No. 49 Gordon Highlander, built for the Great North of Scotland Railway in 1920
Overview
HeadquartersIce Town
Reporting markFGW
LocaleNorth Iceland
Dates of operationMay 12, 1906 (1906-05-12)–January 20, 1923 (1923-01-20)
PredecessorScript error: No such module "If empty".
SuccessorScript error: No such module "If empty".
Technical
Track gaugeStandard
Previous gaugeNarrow
Electrification650 Vdc
LengthScript error: No such module "If empty".
Other
WebsiteTemplate:URL


Template:Organization infoboxes