Template:Railway-routemap/doc

{{Documentation subpage}}

{{High-use}}

This is a universal template for all Route Diagram Templates (RDT). It adds the following text (without the surrounding box) to an RDT:

{{divbox|white||This is a route-map template for a railway in country.

{{X-routemap text}} }}

It will also place the template in the appropriate category (generally Category:Templates for railway lines in country or Category:Templates for railway lines of country) if placed in the template namespace.

Usage

The format is {{Railway-routemap|country|parent article to be linked to|optional parameters}}.

Country is specified by any valid ISO 3166-1 country code.

= Additional codes =

The template also recognizes these unofficial codes:

class = "wikitable"

! Code !! Location

AFRAfrica
AA or ASAAsia
CT or CATCatalonia
EU or EUREurope
KOKorea
NILNorthern Ireland‎
UKUnited Kingdom‎

= Optional parameters =

When included, the second (optional) parameter should be the parent article of the diagram.

{{Railway-routemap|UK|Stockton and Darlington Railway}}

will change the first line of the template to:

{{divbox|white||{{#invoke:string|replace|{{Railway-routemap|UK|Stockton and Darlington Railway}}|%..*|.|plain=false}}}}

Including the optional named parameter {{para|type}} will change “a railway in Country” to “a alternate text in Country”. For example,

{{Railway-routemap|FRA|type=high-speed rail line}}

will change the first line of the template to:

{{divbox|white||{{#invoke:string|replace|{{Railway-routemap|FRA|type=high-speed rail line}}|%..*|.|plain=false}}}}

and,

{{Railway-routemap|CAN|Yellow Line (Montreal Metro)|type=subway}}

will change the first line of the template to:

{{divbox|white||{{#invoke:string|replace|{{Railway-routemap|CAN|Yellow Line (Montreal Metro)|type=subway}}|%..*|.|plain=false}}}}

The optional named parameter {{para|the}}anything will omit the word “the” before the linked page. For example,

{{Railway-routemap|NL|the=x|Centraal Station|type=railway terminal}}

will change the first line of the template to:

{{divbox|white||{{#invoke:string|replace|{{Railway-routemap|NL|the=x|Centraal Station|type=railway terminal}}|%..*|.|plain=false}}}}

The optional named parameter {{para|display}} will replace the text of the article link. If {{code|display}} is set to either {{code|I}} or {{code|i}} the article link will automatically be italicized. This is useful for named train services. For example,

{{Railway-routemap|US|Heartland Flyer|display=Heartland Flyer|type=Amtrak train service}} and
{{Railway-routemap|US|Heartland Flyer|display=i|type=Amtrak train service}}

will both change the first line of the template to:

{{divbox|white||{{#invoke:string|replace|{{Railway-routemap|US|Heartland Flyer|display=i|type=Amtrak train service}}|%..*|.|plain=false}}}}

The optional named parameter {{para|place}} will change “a railway in Country” to “a railway in place, Country”. For example,

{{Railway-routemap|IN|place=Bangalore}}

will change the first line of the template to:

{{divbox|white||{{#invoke:string|replace|{{Railway-routemap|IN|place=Bangalore}}|%..*|.|plain=false}}}}

= Categories =

By default the template will be included in the appropriate category for that country. However, adding the parameter {{para|cat|no}} will exclude the template from all categories. Note that this parameter is not case sensitive: i.e. {{para|cat|NO}} produces the same result as {{para|cat|no}}.

Setting {{para|cat|s}} or {{code|{{=}}stn}} or {{code|{{=}}station}} will also add the template to either :Category:Station layout templates or the appropriate sub-category, and change the first line of the template to:

{{divbox|white||This is a route-map template for a station in country.}}

Setting {{para|cat|seg}} or {{code|{{=}}segment}} will also add the template to :Category:Route diagram template segments, and change the first line of the template to:

{{divbox|white|| This is a route-map template for an RDT segment in country.}}

For Australia (ISO 3166-1 country code AU or AUS), setting the category to one of the state abbreviations will include the template in the appropriate sub-category:

class="wikitable"

! {{para|cat}} !! State !! Category

N or NTNorthern Territory
NS or NSWNew South Wales:Category:New South Wales route diagram templates‎
Q or QLDQueensland:Category:Queensland route diagram templates‎
V or VICrowspan="2"| Victoria:Category:Victoria (state) route diagram templates
Vs or VICs:Category:Victoria (state) station layout templates
SASouth Australia
T or TASTasmania
W or WArowspan="2"| Western Australia:Category:Western Australia rail transport templates
Ws or WAs:Category:Western Australia station layout templates

This parameter is also not case sensitive.

The optional named parameter {{para|catidx}} will add a sort key to the category.

See also