Difference between revisions of "Template:Infobox rail"
Jump to navigation
Jump to search
Template>Trialpears (Wikipedia:Templates for discussion/Log/2019 November 22#Template:Infobox rail closed as merge (XFDcloser)) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox | {{Infobox | ||
+ | | subbox = {{{subbox|}}} | ||
+ | | headerstyle= background-color: #efefef | ||
+ | |||
|title = {{{name|{{{railroad_name|}}}}}} | |title = {{{name|{{{railroad_name|}}}}}} | ||
+ | | subheader = {{{other_name|}}} | ||
− | | | + | |image1 = <center>{{#invoke:InfoboxImage|InfoboxImage|image={{{logo|{{{logo_filename|}}}}}}|size={{{logo_size|}}}|sizedefault=frameless|upright=0.91|alt={{{logo_alt|}}}}}</center> |
− | | | + | |caption1 = {{#if:{{{image|{{{image_filename|}}}}}}||{{{caption|{{{image_caption|}}}}}}}} |
|image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{{system_map|}}}|size={{{map_size|}}}|sizedefault=frameless|upright=1.14|alt={{{map_alt|}}}}} | |image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{{system_map|}}}|size={{{map_size|}}}|sizedefault=frameless|upright=1.14|alt={{{map_alt|}}}}} | ||
|caption2 = {{{map_caption|}}} | |caption2 = {{{map_caption|}}} | ||
− | |image3 = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|sizedefault=frameless|upright=1.14|alt={{{image_alt|{{{alt|}}}}}}}} | + | |image3 = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{{image_filename|}}}}}}|size={{{image_size|}}}|sizedefault=frameless|upright=1.14|alt={{{image_alt|{{{alt|}}}}}}}} |
|caption3 = {{{caption|{{{image_caption|}}}}}} | |caption3 = {{{caption|{{{image_caption|}}}}}} | ||
− | | | + | |header1 = {{#if:{{{marks|{{{abbr|}}}}}}{{{locale|}}}{{{start_year|{{{founded|}}}}}}{{{end_year|{{{defunct|}}}}}}{{{predecessor_line|}}}{{{predecessors|}}}{{{predecessor|}}}{{{successor_line|}}}{{{successors|}}}{{{successor|}}}{{{headquarters|{{{hq_city|}}}}}}|Overview}} |
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |label10 | + | | label2 = Franchise(s) |
− | |data10 | + | | data2 = {{{franchise|}}} |
+ | | label3 = Current operator | ||
+ | | data3 = {{{operator|}}} | ||
+ | | label4 = Main {{if empty|{{{nameforarea|}}}|region}}(s) | ||
+ | | data4 = {{{regions|}}} | ||
+ | | label5 = Other {{if empty|{{{nameforarea|}}}|region}}(s) | ||
+ | | data5 = {{{secregions|}}} | ||
+ | | label6 = Fleet size | ||
+ | | data6 = {{{fleet|}}} | ||
+ | | label7 = Stations called at | ||
+ | | data7 = {{{stations|}}} | ||
+ | | label8 = Stations operated | ||
+ | | data8 = {{{stationsop|}}} | ||
+ | | label9 = Parent company | ||
+ | | data9 = {{{parent_company|}}} | ||
+ | | label10 = Headquarters | ||
+ | | data10 = {{{headquarters|{{{hq_city|}}}}}} | ||
+ | | label20 = [[Reporting mark]] | ||
+ | | data20 = {{{marks|{{{abbr|}}}}}} | ||
+ | | label21 = Locale | ||
+ | | data21 = {{{locale|}}} | ||
+ | | label22 = Dates of operation | ||
+ | | data22 = {{#if:{{{start_year|{{{founded|}}}}}}{{{end_year|{{{defunct|}}}}}}|{{{start_year|{{{founded|}}}}}}–{{{end_year|{{{defunct|}}}}}}|{{#if:{{{dates|}}}|{{{dates}}}}}}} | ||
+ | | label23 = Predecessor{{#if:{{{predecessors|}}}|s}} | ||
+ | | data23 = {{if empty|{{{predecessor_line|}}}|{{{predecessors|}}}|{{{predecessor|}}}}} | ||
+ | | label24 = Successor{{#if:{{{successors|}}}|s}} | ||
+ | | data24 = {{if empty|{{{successor_line|}}}|{{{successors|}}}|{{{successor|}}}}} | ||
− | | | + | | header30 = {{#if:{{{gauge|}}}{{{old_gauge|}}}{{{electrification|{{{el|}}}}}}{{{length|}}}{{{linelength|}}}{{{routekm|}}}{{{tracklength|}}}{{{notrack|}}}{{{speed|}}}{{{elevation|}}}|Technical}} |
− | | | + | | label31 = [[Track gauge]] |
+ | | data31 = {{{gauge|}}} | ||
+ | | label32 = Previous gauge | ||
+ | | data32 = {{{old_gauge|}}} | ||
+ | | label33 = [[Railway electrification system|Electrification]] | ||
+ | | data33 = {{{electrification|{{{el|}}}}}} | ||
+ | | label34 = Length | ||
+ | | data34 = {{if empty|{{{length|}}}|{{{linelength|}}}|{{{routekm|}}}}} | ||
+ | | label35 = Track length | ||
+ | | data35 = {{{tracklength|}}} | ||
+ | | label36 = {{abbr|No.|Number}} of tracks | ||
+ | | data36 = {{{notrack|}}} | ||
+ | | label37 = Operating speed | ||
+ | | data37 = {{{speed|}}} | ||
+ | | label38 = Highest elevation | ||
+ | | data38 = {{{elevation|}}} | ||
− | | | + | | header41 = {{#if:{{{website|}}}{{{embedded|}}}|Other}} |
+ | | label42 = Website | ||
+ | | data42 = {{{website|}}} | ||
+ | | data43 = {{{embedded|}}} | ||
| belowstyle = vertical-align: middle; padding: 0 | | belowstyle = vertical-align: middle; padding: 0 | ||
Line 56: | Line 79: | ||
{{{routemap|{{{map}}}}}}</td></tr> | {{{routemap|{{{map}}}}}}</td></tr> | ||
</table>}} | </table>}} | ||
− | }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox rail with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox rail]] with unknown parameter "_VALUE_"| alt | caption | electrification | embedded | end_year | gauge | headquarters | hq_city | image | image_alt | image_caption | image_size | length | locale | logo | logo_alt | logo_filename | logo_size | map | map_alt | map_caption | map_name | map_size | map_state | marks | name | old_gauge | predecessor_line | railroad_name | routemap | start_year | successor_line | system_map | website | + | }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox rail with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox rail]] with unknown parameter "_VALUE_"|ignoreblank=y| abbr | alt | caption | dates | defunct | el | electrification | elevation | embedded | end_year | fleet | founded | franchise | gauge | headquarters | hq_city | image | image_alt | image_caption | image_filename | image_size | length | linelength | locale | logo | logo_alt | logo_filename | logo_size | map | map_alt | map_caption | map_name | map_size | map_state | marks | name | nameforarea | notrack | old_gauge | operator | other_name | parent_company | predecessor | predecessor_line | predecessors | railroad_name | regions | routekm | routemap | secregions | speed | start_year | stations | stationsop | subbox | successor | successor_line | successors | system_map | tracklength | website }}{{#if: |
− | }}{{#if: | ||
{{#ifeq:{{{name|{{{railroad_name|}}}}}}|{{{railroad_name|{{{name|}}}}}}||1}} | {{#ifeq:{{{name|{{{railroad_name|}}}}}}|{{{railroad_name|{{{name|}}}}}}||1}} | ||
{{#ifeq:{{{logo|{{{logo_filename|}}}}}}|{{{logo_filename|{{{logo|}}}}}}||1}} | {{#ifeq:{{{logo|{{{logo_filename|}}}}}}|{{{logo_filename|{{{logo|}}}}}}||1}} | ||
Line 64: | Line 86: | ||
{{#ifeq:{{{headquarters|{{{hq_city|}}}}}}|{{{hq_city|{{{headquarters|}}}}}}||1}} | {{#ifeq:{{{headquarters|{{{hq_city|}}}}}}|{{{hq_city|{{{headquarters|}}}}}}||1}} | ||
{{#ifeq:{{{routemap|{{{map|}}}}}}|{{{map|{{{routemap|}}}}}}||1}} | {{#ifeq:{{{routemap|{{{map|}}}}}}|{{{map|{{{routemap|}}}}}}||1}} | ||
− | |[[Category:Pages using infobox rail with unknown parameters|χ]] | + | |{{main other|[[Category:Pages using infobox rail with unknown parameters|χ]]}} |
}}<noinclude> | }}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 18:34, 27 September 2023
This template uses Lua: |
Contents
Usage
[[File:{{{system_map}}}|{{{map_size}}}|alt={{{map_alt}}}|upright=1.14]] | |||
[[File:{{{image}}}|{{{image_size}}}|alt={{{image_alt}}}|upright=1.14]] | |||
Overview | |||
---|---|---|---|
Headquarters | {{{hq_city}}} | ||
Reporting mark | {{{marks}}} | ||
Locale | {{{locale}}} | ||
Dates of operation | {{{start_year}}}–{{{end_year}}} | ||
Predecessor | {{{predecessor_line}}} | ||
Successor | {{{successor_line}}} | ||
Technical | |||
Track gauge | {{{gauge}}} | ||
Previous gauge | {{{old_gauge}}} | ||
Electrification | {{{electrification}}} | ||
Length | {{{length}}} | ||
Other | |||
Website | {{{website}}} | ||
|
{{Infobox rail}} is used to create an infobox on articles about railway companies; |railroad_name=
is the only mandatory parameter. {{Infobox rail line}} is used for railway lines; this template is sometimes used on articles about both a company and a line (e.g. Romney, Hythe and Dymchurch Railway).
Syntax
{{Infobox rail |railroad_name = |logo = |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 = <!-- This needs to be able to handle two current gauges. --> |old_gauge = <!-- This needs a separate line --> |electrification = |length = |hq_city = |website = <!-- {{URL|example.com}} --> |embedded = }}
Parameters
Parameter | Required | Definition |
---|---|---|
railroad_name |
Yes | Name of railway company, displayed at top of infobox |
logo |
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 |
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 {{Track gauge}}) |
old_gauge |
No | Old rail gauge (use template {{Track gauge}}) |
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 |
Embedding other infoboxes
The embedded=
parameter can be used to embed another infobox with such capability like {{designation list}} and {{infobox NRHP}}.
Examples
Usage | Code | Example | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Minimum use | {{Infobox rail |railroad_name=[[Isle of Sodor Railway]] }} |
|||||||||||||||||||||||||||||||||
Logo | {{Infobox rail | railroad_name=[[Isle of Sodor Railway]] | logo = No-photo.svg | logo_size = 300px}} |
|||||||||||||||||||||||||||||||||
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 }} |
|||||||||||||||||||||||||||||||||
Text | {{Infobox rail |railroad_name = [[Great North of Scotland Railway]] |marks = FGW |locale = North Scotland |start_year = {{Start date|1906|5|12}} |end_year = {{End date|1923|1|20}} |predecessor_line = |successor_line = [[London and North Eastern Railway]] |gauge = {{Track gauge|56.5in|allk=on}} |old_gauge = {{Track gauge|42in|lk=on}} |electrification = 650 [[Volt|V]] [[Direct current|DC]] |length = {{convert|50|mi}} |hq_city = N/A |website = N/A }} |
| ||||||||||||||||||||||||||||||||
(Nearly) Everything | {{Infobox rail | railroad_name = [[Great North of Scotland Railway]] | logo = 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 Scotland |start_year = {{Start date|1906|5|12}} |end_year = {{End date|1923|1|20}} |predecessor_line= |successor_line = [[London and North Eastern Railway]] |gauge = {{Track gauge|56.5in|allk=on}} |old_gauge = {{Track gauge|42in|lk=on}} |electrification= 650 [[Volt|V]] [[Direct current|DC]] |length = {{convert|50|mi}} |hq_city = N/A |website = N/A }} |
|