Template:Rail-interchange/doc

From Minecart Rapid Transit Wiki
Jump to navigation Jump to search

The {{rail-interchange|…}} template is an abstraction layer to cope with rebranding and renaming of transport systems. The template maps f (where, how) → to brand, link, icon(s) allowing the whole of Wikipedia to be easily updated when a transport network switches operator, changes name or updates their logo.

Avoid brandname, operator or sponsor names when choosing the location/link pair.

Usage

The optional named parameter |size= will override the default height of the icon (between 10 and 20 pixels):

NBCS#1 {{rail-interchange|nbc|1|size=10}}
NBCS#1 {{rail-interchange|nbc|1}}
NBCS#1 {{rail-interchange|nbc|1|size=30}}

The value for |size= must be an integer and should not be any larger than the display height of the diagram icons themselves (20 pixels in most diagrams).

The icons' wikilink and alternate text can be overridden by adding the optional parameters |link=newlink and |alt=othertext. Note that if only the |link= parameter is changed then the |alt= parameter will change from the default to the new link text. (However, the |alt= parameter can be changed without affecting the link target.)

Adding content

Adding a city/company

Due to the way that the template is set up, a city or company must be present before adding lines or icons.


| <city/company> ={{#switch: {{lc: {{{2}}} }}

  • Note: End a city/company's section (after it's icons) with }} or the template will break.

Adding icons

| <line> =[[File:<line icon>.png|{{{size|20}}}px|link={{{link|<link here>}}}|alt={{{alt|{{{link|<link here>}}}}}}]]


Originally sourced from https://en.wikipedia.org/wiki/Template:Rail-interchange.