Difference between revisions of "Template:Infobox rail line/doc"
Jump to navigation
Jump to search
imported>Thumperward (shift from template) |
imported>Sameboat |
||
| Line 123: | Line 123: | ||
|map_state = collapsed | |map_state = collapsed | ||
}}</pre> | }}</pre> | ||
| + | |||
| + | === Including [[WP:Route diagram template]] in map parameter === | ||
| + | |||
| + | There are reports that route map using [[WP:Route diagram template]] included in the infobox "breaks" like the left one. | ||
| + | |||
| + | To solve this row breaking issue, rewrite the syntax by applying 2 other templates like this: | ||
| + | |||
| + | <pre>map = {{{!}}{{Railway line header1}}{{BS-table2}}{{YOUR ROUTE TEMPLATE}}</nowiki> | ||
| + | |||
| + | {{!}}}</pre> | ||
| + | |||
| + | {| | ||
| + | !breaking rows!!fixed | ||
| + | |- | ||
| + | |valign=top| | ||
| + | {{Infobox rail line | ||
| + | |map = {{PATH HOB-33}} | ||
| + | |map_state = show | ||
| + | }} | ||
| + | | | ||
| + | {{Infobox rail line | ||
| + | |map = {{{!}}{{Railway line header1}}{{BS-table2}}{{PATH HOB-33}} | ||
| + | {{!}}} | ||
| + | |map_state = show | ||
| + | }} | ||
| + | |} | ||
| + | |||
| + | If some of the row (not entirely) still breaks, possibly the infobox width is too short and forcing some of the text description within the route diagram template returns. Increase the '''box_width''' parameter will solve this problem. | ||
=== Example === | === Example === | ||
Revision as of 01:24, 6 September 2008
Template:Template doc page viewed directly
| This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
Please use Template:Infobox rail line freight for freight lines (includes historic data).
Contents
Parameter list and definitions
| Name | Parameter | Required | Definition |
|---|---|---|---|
| Infobox width | box_width |
No | Width of infobox, omitted: 25em; blank: width depends on infobox content |
| Name | name |
No | Name of rail line |
| Color | color |
No | Color of rail line |
| Logo | logo |
No | Filename of image for the logo |
| Logo width | logo_width |
No | Size of logo |
| Image | image |
No | Filename of image |
| Image width | image_width |
No | Size of image |
| Caption | caption |
No | Caption of image |
| Type | type |
Yes | Type of transit system. Types may include (one or more):
|
| System | system |
No | Name of transit system the rail line is part of |
| Status | status |
No | Status of rail line |
| Locale | locale |
No | City or region transit system is located |
| Start terminus | start |
No | Name of starting terminal station |
| End terminus | end |
No | Name of ending terminal station |
| No. of stations | stations |
No | Number of stations/stops |
| Service routes | routes |
No | Service routes of rail line |
| Daily ridership | ridership |
No | Daily system ridership |
| Opened | open |
No | Date rail line opened |
| Closed | close |
No | Date rail line closed |
| Owner | owner |
No | Owner of rail line |
| Operator(s) | operator |
No | Operator of rail line |
| Character | character |
No | |
| Depot(s) | depot |
No | Name of traction maintenance depot(s) of rail line |
| Rolling stock | stock |
No | Types of rolling stock used on the rail line |
| Line length | linelength |
No | Line length (use {{mi to km}} or {{km to mi}} to display both U.S. and metric units) |
| Track length | tracklength |
No | Track length (use {{mi to km}} or {{km to mi}} to display both U.S. and metric units) |
| No. of tracks | notrack |
No | Number of tracks |
| Gauge | gauge |
No | Rail gauge (use template – see Category:Rail transport gauge templates) |
| Electrification | el |
No | Electrification system (e.g. Third rail, Overhead catenary) and/or voltage |
| Operating speed | speed |
No | Maximum or operating speed of the rail line |
| Highest elevation | elevation |
No | Highest elevation of the rail line |
| Line map | map |
No | Map of line |
| Show/hide line map | map_state |
No | Shows or hides map. Use show or collapsed
|
Usage
Copy and paste
{{Infobox rail line
|name =
|color =
|logo =
|logo_width =
|image =
|image_width =
|caption =
|type =
|system =
|status =
|locale =
|start =
|end =
|stations =
|routes =
|ridership =
|open =
|close =
|owner =
|operator =
|character =
|depot =
|stock =
|linelength =
|tracklength =
|notrack =
|gauge =
|el =
|speed =
|elevation =
|map =
|map_state = collapsed
}}
Including WP:Route diagram template in map parameter
There are reports that route map using WP:Route diagram template included in the infobox "breaks" like the left one.
To solve this row breaking issue, rewrite the syntax by applying 2 other templates like this:
map = {{{!}}{{Railway line header1}}{{BS-table2}}{{YOUR ROUTE TEMPLATE}}</nowiki>
{{!}}}
| breaking rows | fixed | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||||
If some of the row (not entirely) still breaks, possibly the infobox width is too short and forcing some of the text description within the route diagram template returns. Increase the box_width parameter will solve this problem.
Example
{{Infobox rail line
|name = Alpha Line
|color = 003399
|logo = wiki.png
|logo_width = 100px
|image = placeholder.png
|image_width =
|caption = Placeholder caption
|type = [[Light rail]]
|system = ABC Transit
|status = Ceased operation
|locale = [[Newark, New Jersey|Newark]]
|start = Station A
|end = Station M
|stations = 15
|routes = 1
|ridership = 239,200
|open = [[June 22]], [[1904]]
|close = [[March 8]], [[1942]]
|owner =
|operator = BCT Transport
|character =
|depot =
|stock =
|linelength = {{mi to km|13.8|abbr=yes|precision=2|wiki=yes}}
|tracklength =
|notrack =
|gauge = {{RailGauge|sg}} ([[standard gauge]])
|el =
|speed =
|elevation =
|map = [[Image:placeholder.png|200px]]
|map_state = collapsed
}}
|
| ||||||||||||||||||||||||||||||||||||||||||
