Template:Infobox rail: Difference between revisions
Appearance
Content deleted Content added
new |
add class="infobox-header" to route map name for dark style fixes to apply |
||
(117 intermediate revisions by 47 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox |
|||
{| align="right" border="1" cellpadding="2" cellspacing="0" width="300" style="margin-left:0.5em; clear:right;" |
|||
| subbox = {{{subbox|}}} |
|||
|- |
|||
| headerstyle= background-color: #efefef |
|||
! align="center" colspan="2" style="background:#C0C090; font-size: larger;" | {{{railroad_name}}} |
|||
|- |
|||
|title = {{{name|{{{railroad_name|}}}}}} |
|||
| align="center" colspan="2" | [[Image:{{{logo_filename}}}|{{{logo_size}}}px]] |
|||
| subheader = {{{other_name|}}} |
|||
|- |
|||
| '''[[Reporting mark]]s''' || {{{marks}}} |
|||
|image1 = {{#invoke:InfoboxImage|InfoboxImage|image={{{logo|{{{logo_filename|}}}}}}|size={{{logo_size|}}}|sizedefault=frameless|upright=0.91|alt={{{logo_alt|}}}}} |
|||
|- |
|||
|caption1 = {{#if:{{{image|{{{image_filename|}}}}}}||{{{caption|{{{image_caption|}}}}}}}} |
|||
| '''Locale''' || {{{locale}}} |
|||
|- |
|||
|image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{{system_map|}}}|size={{{map_size|}}}|sizedefault=frameless|upright=1.14|alt={{{map_alt|}}}}} |
|||
| '''Years of operation''' || {{{start_year}}} – {{{end_year}}} |
|||
|caption2 = {{{map_caption|}}} |
|||
|- |
|||
| '''[[Track gauge]]''' || {{{gauge}}} |
|||
|image3 = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{{image_filename|}}}}}}|size={{{image_size|}}}|sizedefault=frameless|upright=1.14|alt={{{image_alt|{{{alt|}}}}}}}} |
|||
|- |
|||
|caption3 = {{{caption|{{{image_caption|}}}}}} |
|||
| '''Headquarters''' || {{{hq_city}}} |
|||
|} |
|||
|header1 = {{#if:{{{marks|{{{abbr|}}}}}}{{{locale|}}}{{{start_year|{{{founded|}}}}}}{{{end_year|{{{defunct|}}}}}}{{{predecessor_line|}}}{{{predecessors|}}}{{{predecessor|}}}{{{successor_line|}}}{{{successors|}}}{{{successor|}}}{{{headquarters|{{{hq_city|}}}}}}|Overview}} |
|||
| label2 = Franchise(s) |
|||
| data2 = {{{franchise|}}} |
|||
| label3 = Contract(s) |
|||
| data3 = {{{contract|}}} |
|||
| label4 = Concession(s) |
|||
| data4 = {{{concession|}}} |
|||
| label5 = Current operator |
|||
| data5 = {{{operator|}}} |
|||
| label6 = Main {{if empty|{{{nameforarea|}}}|region}}(s) |
|||
| data6 = {{{regions|}}} |
|||
| label7 = Other {{if empty|{{{nameforarea|}}}|region}}(s) |
|||
| data7 = {{{secregions|}}} |
|||
| label8 = Fleet size |
|||
| data8 = {{{fleet|}}} |
|||
| label9 = Stations called at |
|||
| data9 = {{{stations|}}} |
|||
| label10 = Stations operated |
|||
| data10 = {{{stationsop|}}} |
|||
| label11 = Parent company |
|||
| data11 = {{{parent_company|}}} |
|||
| label12 = Headquarters |
|||
| data12 = {{{headquarters|{{{hq_city|}}}}}} |
|||
| label13 = Key people |
|||
| data13 = {{{key_people|}}} |
|||
| label14 = Founders |
|||
| data14 = {{{founders|}}} |
|||
| 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|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 |
|||
| below = {{#if:{{{routemap|{{{map|}}}}}}| |
|||
<table style="border-spacing: 0; width: 100%; min-width: 100%" class="mw-collapsible {{#switch:{{{map_state|}}} |
|||
|1|yes|collapsed|hide = mw-collapsed autocollapse |
|||
|0|no|show|uncollapsed|#default = uncollapsed |
|||
}}"> |
|||
<tr style="background-color: #efefef;" class="infobox-header"><th style="text-align:center"><div style="margin:0 4em">{{#if:{{{map_name|}}}|{{{map_name}}}|Route map}}</div></th></tr> |
|||
<tr><td style="text-align:center; padding-top: 3px"> |
|||
{{{routemap|{{{map}}}}}}</td></tr> |
|||
</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_"|ignoreblank=y| abbr | alt | caption | contract | concession | dates | defunct | el | electrification | elevation | embedded | end_year | fleet | founded | founders | franchise | gauge | headquarters | hq_city | image | image_alt | image_caption | image_filename | image_size | key_people | 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 }}{{#invoke:Check for clobbered parameters|check |
|||
| nested = 1 |
|||
| template = Infobox rail |
|||
| cat = {{main other|Category:Pages using infobox rail with conflicting parameters}} |
|||
| abbr; marks |
|||
| alt; image_alt |
|||
| caption; image_caption |
|||
| defunct; end_year |
|||
| el; electrification |
|||
| founded; start_year |
|||
| headquarters; hq_city |
|||
| image; image_filename |
|||
| logo; logo_filename |
|||
| map; routemap |
|||
| name; railroad_name |
|||
}}<noinclude> |
|||
{{documentation}} |
|||
</noinclude> |
Latest revision as of 07:35, 5 July 2024
This template is used on approximately 3,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
Usage
{{{other_name}}} | |||
[[File:{{{logo}}}|{{{logo_size}}}|alt={{{logo_alt}}}|upright=0.91]] | |||
[[File:{{{system_map}}}|{{{map_size}}}|alt={{{map_alt}}}|upright=1.14]] | |||
[[File:{{{image}}}|{{{image_size}}}|alt={{{image_alt}}}|upright=1.14]] | |||
Overview | |||
---|---|---|---|
Franchise(s) | {{{franchise}}} | ||
Main {{{nameforarea}}}(s) | {{{regions}}} | ||
Other {{{nameforarea}}}(s) | {{{secregions}}} | ||
Fleet size | {{{fleet}}} | ||
Stations called at | {{{stations}}} | ||
Stations operated | {{{stationsop}}} | ||
Parent company | {{{parent_company}}} | ||
Headquarters | {{{headquarters}}} | ||
Key people | {{{key_people}}} | ||
Founders | {{{founders}}} | ||
Reporting mark | {{{marks}}} | ||
Locale | {{{locale}}} | ||
Dates of operation | {{{start_year}}}–{{{end_year}}} | ||
Predecessors | {{{predecessor_line}}} | ||
Successors | {{{successor_line}}} | ||
Technical | |||
Track gauge | {{{gauge}}} | ||
Previous gauge | {{{old_gauge}}} | ||
Electrification | {{{electrification}}} | ||
Length | {{{length}}} | ||
Track length | {{{tracklength}}} | ||
No. of tracks | {{{notrack}}} | ||
Operating speed | {{{speed}}} | ||
Highest elevation | {{{elevation}}} | ||
Other | |||
Website | {{{website}}} | ||
{{{embedded}}} | |||
|
{{Infobox rail}} is used to create an infobox on articles about railway companies; |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). It may also be used on affiliate companies operating rail public transit systems under contract (e.g. Arriva Rail London).
Syntax
{{Infobox rail
| name =
| other_name =
| logo =
| logo_size =
| logo_alt =
| system_map =
| map_size =
| map_alt =
| map_caption =
| image =
| image_size =
| alt =
| caption =
| franchise =
| nameforarea =
| regions =
| secregions =
| fleet =
| stations =
| stationsop =
| parent_company =
| headquarters =
| founders =
| key_people =
| marks =
| locale =
| start_year = <!-- {{Start date|YYYY}} -->
| end_year = <!-- For currently operating lines, use "present". For defunct lines, use {{End date|YYYY}} -->
| predecessor_line = <!-- "predecessors" can also be used; will make label plural. -->
| successor_line = <!-- "successors" can also be used; will make label plural. -->
| gauge = <!-- {{Track gauge|Standard gauge}} -->
| old_gauge =
| electrification =
| length =
| tracklength =
| notrack =
| speed =
| elevation =
| website = <!-- {{URL|example.com}} -->
| embedded =
| map =
| map_state =
| map_name =
}}
Parameters
Parameter | Required | Definition |
---|---|---|
name |
Yes | Name of railway company, displayed at top of infobox |
railroad_name |
No | Another version of name, with the same effect. Name and railroad name may not be used at the same time. |
other_name |
No | Other name(s) that the railway company is or was known by. |
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 |
franchise |
No | For passenger operators: The name of the operating franchise the company operates under. Open access operators may be represented as "Not subject to franchising or subsidy". Railfreight companies may leave this parameter blank. |
contract |
No | For passenger operators: The name of the operating contract the company operates under. |
concession |
No | For passenger operators: The name of the operating concession the company operates under. |
regions |
No | The primary region the railway operates in. For a more specific route or station, use nameforarea parameter |
secregions |
No | The secondary regions the railway serves |
nameforarea |
No | May be used in lieu of regions or secregions |
fleet |
No | Details about the rolling stock, and where possible, any stock on order |
stations |
No | For passenger companies: The total number of stations served |
stationsop |
No | Number of stations the railway acts as property manager for, whether in a de jure or de facto status. |
parent_company |
No | The shareholders in the company, in some cases, the owner. Leave blank if owner is an individual person. |
headquarters |
No | The city where the railway's main office is located. |
founders |
No | Important founders of the company; use {{plainlist}} for multiple entries |
key_people |
No | Current executives of the company; use {{plainlist}} for multiple entries |
marks |
No | The reporting mark. The definition may be:
|
abbr |
No | Another version of marks, with the same effect. Abbr and marks may not be used at the same time. |
locale |
No | Region railway is located, typically a bioregion. Used primarily for freight railways. |
start_year |
No | Year railway commenced operations, if exact date is known 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 | Year railway ceased operations, if exact date is known, use {{End date}} template. If currently operating, type "present". Shown as Dates of operation. |
predecessor_line |
No | The definition may be:
|
successor_line |
No | Subsequent railway company that operated the company's railway lines |
predecessor |
No | Another version of predecessor_line, with the same effect. |
successor |
No | Another version of successor_line, with the same effect. |
successors |
No | Similar to successor, but used when a company has more than one successor (e.g. Conrail). |
gauge |
No | Current track gauge (use template {{Track gauge}}) |
old_gauge |
No | Previous rail gauge (use template {{Track gauge}}), shown as Previous gauge |
electrification |
No | Type and voltage of electrification system. Leave blank if no electrification exists. |
length |
No | Total length of the railway system |
speed |
No | Maximum operating speed of the railway's services, and where possible, the service type in parentheses. |
website |
No | Official website, use {{URL}} template. |
operator |
No | For defunct companies, the current company or companies operating the former company's lines. |
notrack |
No | The number of tracks on the company's main line. |
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
| name = Isle of Sodor Railway
}}
|
|||||||||||||||||||||||||||||||
Logo | {{Infobox rail
| name = Isle of Sodor Railway
| logo = No-photo.svg
| logo_size = 300px
}}
|
|||||||||||||||||||||||||||||||
Image | {{Infobox rail
| 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
| 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
| name = [[Great North of Scotland Railway]]
| other_name =
| 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
}}
|
|