• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Rail color box/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Rail color box
This is the template sandbox page for Template:Rail color box (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 15,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.
The accessibility of this template is in question. Relevant discussion may be found on the talk page.
Pages related to
Module:Adjacent stations
(talk | sandbox | sub-pages)
{{Infobox station}}
(talk | sandbox | testcases)
{{Station link}}
(talk | sandbox | testcases)
{{Station icon link}}
(talk | sandbox | testcases)
{{Rail color}}
(talk | sandbox | testcases)
{{Line link}}
(talk | sandbox | testcases)
{{Rail icon}}
(talk | sandbox | testcases)
{{Rail color box}}
(talk | sandbox | testcases)
{{Adjacent stations}}
(talk | sandbox | testcases)
{{Line terminus link}}
(talk | sandbox | testcases)
  • v
  • t
  • e
Shortcut
  • {{rcbTemplate:Rcb}}
This template uses Lua:
  • Module:Adjacent stations (sandbox)

Template:Rail color box is intended to be used within station and line infoboxes, diagrams, navboxes and tables to show a small color box and a link to the associated line or service name. Its use should be avoided within body text.

Contents

  • 1 Usage
  • 2 Parameters
    • 2.1 TemplateData
  • 3 Examples
  • 4 System abbreviations
  • 5 Variants

Usage

edit
  • {{Rail color box|system=|line=|inline=|type=|note=}}

Parameters

edit
Template parameters
Parameter Description
system or 1 An identifier to specify which system's color and line article name convention should be used. Either Module:Adjacent stations/system or Template:system color must exist, e.g. Template:RE-BB color or Module:Adjacent stations/Taipei Metro
line or 2 The line or service to be linked.
inline or 3 An optional parameter to create a color box and link suitable for use inline with other text:
Value Description Example Example
yes Inline color box with link      C Line      Green Line
small Line strip with link   C Line   Green Line
dot Small circle with link ● C Line ● Green Line
square Small square with link ■ C Line ■ Green Line
link Linked box          
ldot Linked small circle ● ●
lsquare Linked small square ■ ■
box Box with link omitted.          
route Box with text C Green
broute Bordered box with text C Green
croute Box with text and border radius C Green
xroute Transparent box with text and border radius C Green
type This adds " – type" to the end, where type is the parameter value (which may be changed by a module subpage), and also passes the value to the data template or module. Typically a service or branch of the line.
note An optional note with more information added at the end.

For systems where multiple colors are used to designate different lines, the appropriate color will be selected based on the combination of the system and line parameters. The same is done for systems where types or services have their own colors. Some options, such as setting the text color, border color, and the short name for the latter three, require the use of a module subpage. Each line can have its own values, as can each type. The table keys for line and type tables are the same: ["border color"], ["text color"] and ["short name"]. Note that the ["background color"] key is not used by this template.

TemplateData

edit
TemplateData documentation used by VisualEditor and other tools
See a monthly parameter usage report for Template:Rail color box in articles based on its TemplateData.

TemplateData for Rail color box

Template which generates colored boxes to indicate rail lines, optionally with a link to the line's article.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
System1 system

no description

Stringrequired
Line2 line

no description

Stringsuggested
Inline display type3 inline

no description

Stringsuggested
Type (branch/service)type

no description

Stringoptional
Notenote

no description

Stringoptional

Examples

edit
  • {{Rail color box|system=Amtrak|line=Southwest Chief}} and {{Rail color box|Amtrak|Southwest Chief}} produce
      Southwest Chief
    .
  • {{Rail color box|SEPTA|Wilmington/Newark|note=(rush hour service only)}} produces
      Wilmington/​Newark Line (rush hour service only)
    .

System abbreviations

edit

Lists of available systems are at Category:Rail transport color templates and Special:PrefixIndex/Module:Adjacent stations/.

Abbreviation System
AMT Agence métropolitaine de transport
BART Bay Area Rapid Transit
CTA Chicago Transit Authority
DART Dallas Area Rapid Transit
HBLR Hudson–Bergen Light Rail
KAT Kenosha Transit
LACMTA Los Angeles Metro Rail
LIRR Long Island Rail Road
MARC MARC Train
MARTA Metropolitan Atlanta Rapid Transit Authority
MBTA MBTA Commuter Rail
METROMN Metro (Minnesota)
MNRR Metro-North Railroad
MUNI Muni Metro
NJT NJ Transit
NMRX New Mexico Rail Runner Express
NYCRR New York Central Railroad
PATCO Port Authority Transit Corporation
PATH Port Authority Trans-Hudson
PLR Pittsburgh Light Rail
RIRTR Rochester Subway
RTD Denver Regional Transportation District
SCAX Metrolink (California)
SCVTA Santa Clara Valley Transportation Authority light rail
SEPTA Southeastern Pennsylvania Transportation Authority
SFRTA Tri-Rail
STLLR Sound Transit Link light rail
SNDX Sounder commuter rail
STML St Louis MetroLink
TMTC MAX Light Rail
VMR Valley Metro Rail
VREX Virginia Railway Express
WMATA Washington Metropolitan Area Transit Authority

Variants

edit
Color box templates
  • v
Template Description Example
{{Color box}} Color box size with black borders and text color. Standard size.   or  ORANGE 
{{Color box striped}} Striped color box. Standard size.     
{{RouteBox}} Borderless color box with text color and wikilinks.  ORANGE 
{{Colorbull}} Colored bullet with wikilinks. ■
{{Legend inline}} Color box size with black borders. Standard size.   
{{Color sample}} Color box size with black borders. Smaller size.  
{{Swatch inline}} orange
{{Background color}} orange
{{Rail color box}} A version with more display options. Part of Module:Adjacent stations ●, Orange
{{Diagonal split color box}} Color box split diagonally. Standard size.
   
   
The above documentation is transcluded from Template:Rail color box/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Rail_color_box/sandbox&oldid=882173451"
Last edited on 7 February 2019, at 08:57

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 7 February 2019, at 08:57 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop