Template:BS-map/doc

From Wikipedia, the free encyclopedia
Jump to: navigation, search

This is a shorthand template which groups the deprecated templates {{Railway line header}}, {{BS-header}} and {{BS-table}} all in one single entity to ease the creation of standalone Wikipedia:Route diagram template table.

Usage[edit]

{{{title}}}

{{{top}}}

 {{{map-title}}} 
{{{map}}}
 {{{map2-title}}} 
{{{map2}}}

{{{bottom}}}

{{BS-map
| style = 
| title = 
| title-bg = 
| navbar = 
| collapsible = 
| collapse = 
| width = 
| top = 
| legend = 
| bg = 
| map-title = 
| map = 
| map2-title = 
| map2 = 
| bottom = 
}}

Note[edit]

  • Since this template table applies Infobox class it is float to right by default. If you want to align it to center or left, you need to apply the style parameter by adding float:none; margin:auto or float:left respectively. Alternatively you can include this template in another table which aligns to center or left like so:
{| align=center
|
{{BS-map}}
|}
  • Any manually written new row of map should replace the | by {{!}}.
  • If you are using in-diagram collapsible section which begins with {{BS-startCollapsible}} or {{BS2-startCollapsible}}, the ending of the collapsible section must be {{end}} instead of |}. Otherwise the box will end immediately after the collapsible section.

Parameters[edit]

Parameter names Function
inline Disables title and collapsible function, remove floating, margin and border, widens template width to 100% for transcluding this template into other templates such as {{Infobox rail line}}. If the code of the diagram is not transcluded, but is contained within the code of the infobox,   should be added before {{BS-map}} to force proper table layout.
style Additional CSS syntax which defines the style of the whole box.
width Width of the whole box. Can be overridden by style entry. No default value because it will void the tw parameter in the BSn row template which is applied to override the text column width of BSn row collapsible section.
title Title of the map.
title-bg Background color of the title bar to indicate the livery color of the subject. But this is preferable not to be applied as per WP:COLOR and instead use {{colorbox}} or icon image next to the title text. White by default.
title-color Font color of title text. Black by default.
navbar Specify the template name if your map is written in a separated template page, it will include a mini bracketed {{Navbar}} in the title bar. Leave this parameter blank if you directly use this template in the article.
collapsible Allow the box collapsible or not. yes by default, no will void the "expand/collapse" button.
collapse Collapse state of the whole box. yes for collapsing, no by default.
legend Legend page link:
map BS row templates which comprise the diagram.
mapn n represents numbers 2 to 10. Additional map space. By separating maps into different map parameters, the column alignment of the maps will not affect each other. This is useful if you are displaying two maps where one uses the ordinary BSn row templates (single-side text columns) and the other one uses BSn-2 (dual-side text columns), as the different row templates are not compatible with each other.
map-title
mapn-title
n represents numbers 2 to 10. Optional title header for each map.
map-centered
mapn-centered
n represents numbers 2 to 10. Allows centering/centring each map; will be toggled on for any value.
map-collapsible
mapn-collapsible
n represents numbers 2 to 10. Allows changing the collapsibility of each map. no by default; yes will call the "expand/collapse" button. You must have something in the mapn-title; the mapn-collapsible alone cannot turn it on.
map-collapse
mapn-collapse
n represents numbers 2 to 10. Collapse state of the individual map. yes for collapsing, no by default.
bg Background color of the whole digram, including the text column in the row templates.
top Optional note above the map.
bottom Optional note below the map. Also a good place to include the {{Navbar}} if you do not want to display it in the title bar.
bottomstyle Optional CSS style for the note below the map, for example text-align:center;.

Example[edit]

     Station layout
Placeholder.png
Platform level
Tracks 2
History
Opened 15 May 1935 (1935-05-15)
Route map
Scissors crossover
Side platforms

† Diagram not to scale

{{Infobox station
| name = {{colorbox|orange}} Station layout
| image = Placeholder.png
| image_size = 150px
| image_caption = Platform level
| opened = {{Start date|1935|05|15|df=y}}
| tracks = 2
| route_map =  
{{BS-map
| inline = 1
| legend = track
| map = 
{{BS2|STR|STR}}
{{BS2-startCollapsible|STRg|STRf||}}
{{BS2|KRWgl+l|KRWgr+r||[[Scissors crossover]]}}
{{end}}
{{BS2|STR|STR|tw=200px}}
{{BS2|STR+BSr|STR+BSl||[[Side platform]]s}}
{{BS2|STR+BSr|STR+BSl}}
{{BS2|STRg|STRf||}}
| bottom = † Diagram not to scale
}}
}}

TemplateData[edit]

This is the TemplateData documentation for this template used by VisualEditor and other tools.

BS-map

An infobox template to contain the diagram created with Route Diagram Template standard.

Template parameters
Parameter Description Type Status
Additional CSS style

Additional CSS syntax which defines the style of the whole box. It is useful when you are transcluding this map box into other infobox, e.g. add border:0px;width:100% to remove the border and let it fully stretch inside the infobox.

Default
empty
Example
empty
Auto value
empty
string optional
inline switch inline

Disables title and collapsible function, remove floating, margin and border, widens template width to 100% for transcluding this template into other templates such as {{Infobox rail line}}. If code of the diagram is not transcluded, but is contained within the code of the infobox, should be added before {{BS-map}} to force proper table layout.

Default
empty
Example
empty
Auto value
empty
string optional
Width of the whole box. width

Width of the whole box. Can be overridden by style entry.

Default
empty
Example
empty
Auto value
empty
string optional
Background color of the title bar title-bg

Background color of the title bar to indicate the livery color of the subject. But this is preferable not to be applied as per WP:COLOR and instead use template colorbox or icon image next to the title text.

Default
white
Example
empty
Auto value
empty
string optional
navbar on box header navbar

Specify the template name if your map is written in a separated template page, it will include a mini bracketed template Navbar in the title bar. Leave this parameter blank if you directly use this template in the article.

Default
empty
Example
empty
Auto value
empty
string optional
collapsible or not collapsible

Allow the box collapsible or not.

Default
yes
Example
empty
Auto value
empty
string optional
Collapse state collapse

Collapse state of the whole box. For templates that are collapsed, it is recommended to use the string “|collapse = {{{collapse|yes}}}” so that the template will display in expanded form when viewing the template's page.

Default
no
Example
empty
Auto value
empty
string optional
Legend page link legend

Legend page link

Default
route
Example
empty
Auto value
empty
string optional
1st map space map

Add BSn row templates in this parameter to construct a diagram.

Default
empty
Example
empty
Auto value
empty
content required
2nd map space map2

Add BSn row templates in this parameter to construct a diagram.

Default
empty
Example
empty
Auto value
empty
content optional
3rd map space map3

Add BSn row templates in this parameter to construct a diagram.

Default
empty
Example
empty
Auto value
empty
content optional
4th map space map4

Add BSn row templates in this parameter to construct a diagram.

Default
empty
Example
empty
Auto value
empty
content optional
5th map space map5

Add BSn row templates in this parameter to construct a diagram.

Default
empty
Example
empty
Auto value
empty
content optional
map title map-title

Optional title for map

Default
empty
Example
empty
Auto value
empty
string optional
map2 title map2-title

Optional title for map2

Default
empty
Example
empty
Auto value
empty
string optional
map3 title map3-title

Optional title for map3

Default
empty
Example
empty
Auto value
empty
string optional
map4 title map4-title

Optional title for map4

Default
empty
Example
empty
Auto value
empty
string optional
map5 title map5-title

Optional title for map5

Default
empty
Example
empty
Auto value
empty
string optional
map centered? map-centered

Any value makes this map centered

Default
empty
Example
empty
Auto value
empty
string optional
map2 centered? map2-centered

Any value makes this map centered

Default
empty
Example
empty
Auto value
empty
string optional
map3 centered? map3-centered

Any value makes this map centered

Default
empty
Example
empty
Auto value
empty
string optional
map4 centered? map4-centered

Any value makes this map centered

Default
empty
Example
empty
Auto value
empty
string optional
map5 centered? map5-centered

Any value makes this map centered

Default
empty
Example
empty
Auto value
empty
string optional
Collapsible or not of map map-collapsible

Allow the map collapsible or not. no by default, yes will call the expand collapse button. You MUST have something written in the mapn-title otherwise the mapn-collapsible alone is not enough to turn it on.

Default
no
Example
empty
Auto value
empty
string optional
Collapsible or not of map2 map2-collapsible

Allow the map collapsible or not. no by default, yes will call the expand collapse button. You MUST have something written in the mapn-title otherwise the mapn-collapsible alone is not enough to turn it on.

Default
no
Example
empty
Auto value
empty
string optional
Collapsible or not of map3 map3-collapsible

Allow the map collapsible or not. no by default, yes will call the expand collapse button. You MUST have something written in the mapn-title otherwise the mapn-collapsible alone is not enough to turn it on.

Default
no
Example
empty
Auto value
empty
string optional
Collapsible or not of map4 map4-collapsible

Allow the map collapsible or not. no by default, yes will call the expand collapse button. You MUST have something written in the mapn-title otherwise the mapn-collapsible alone is not enough to turn it on.

Default
no
Example
empty
Auto value
empty
string optional
Collapsible or not of map5 map5-collapsible

Allow the map collapsible or not. no by default, yes will call the expand collapse button. You MUST have something written in the mapn-title otherwise the mapn-collapsible alone is not enough to turn it on.

Default
no
Example
empty
Auto value
empty
string optional
Collapse state of map map-collapse

yes for collapsing, no by default.

Default
no
Example
empty
Auto value
empty
string optional
Collapse state of map2 map2-collapse

yes for collapsing, no by default.

Default
no
Example
empty
Auto value
empty
string optional
Collapse state of map3 map3-collapse

yes for collapsing, no by default.

Default
no
Example
empty
Auto value
empty
string optional
Collapse state of map4 map4-collapse

yes for collapsing, no by default.

Default
no
Example
empty
Auto value
empty
string optional
Collapse state of map5 map5-collapse

yes for collapsing, no by default.

Default
no
Example
empty
Auto value
empty
string optional
Note above top

Optional note above the map, directly below the header row.

Default
empty
Example
empty
Auto value
empty
string optional
Note below bottom

Optional note below the map. This is also the good place to include the template Navbar if you do not want to display it in the title bar.

Default
empty
Example
empty
Auto value
empty
string optional
Note below style bottomstyle

Optional CSS style for the note below the map, for example text-align:center;.

Default
empty
Example
empty
Auto value
empty
string optional