Difference between revisions of "Template:BRC"

From blackwiki
Jump to navigation Jump to search
imported>Mattbuck
(ah, missed a nowiki)
imported>Redrose64
(move doc to subpage)
Line 1: Line 1:
 
[[British Rail Class {{{1}}}|{{#switch:{{{2}}}|f|full|brc|fs|br = British Rail Class {{{1}}}|n = {{{1}}}|s|cs|c|Class {{{1}}}}}{{#switch:{{{3}}}|1|2|3|4|5|6|7|8|9|0 = /{{{3}}}|}}{{#switch:{{{2}}}|fs|cs|ns = s|}}]]<noinclude>
 
[[British Rail Class {{{1}}}|{{#switch:{{{2}}}|f|full|brc|fs|br = British Rail Class {{{1}}}|n = {{{1}}}|s|cs|c|Class {{{1}}}}}{{#switch:{{{3}}}|1|2|3|4|5|6|7|8|9|0 = /{{{3}}}|}}{{#switch:{{{2}}}|fs|cs|ns = s|}}]]<noinclude>
{{documentation|content=
+
{{documentation}}
 
 
This template links to the British Rail Class #, eg <nowiki>{{BRC|158}}</nowiki> produces a link to [[British Rail Class 158|Class 158]].
 
 
 
There are several ways of display, changed by adding a second parameter, eg <nowiki>{{BRC|158|f}}</nowiki>
 
 
 
*f - full link, eg [[British Rail Class 158]]
 
*fs - full link plural, eg [[British Rail Class 158]]s
 
*c (default) - class link, eg [[British Rail Class 158|Class 158]]
 
*cs - class plural, eg [[British Rail Class 158|Class 158s]]
 
*n - number only, eg [[British Rail Class 158|158]]
 
*ns - number plural, eg [[British Rail Class 158|158s]]
 
 
 
 
 
You can also add a third parameter to indicate subclasses, ''but this is not linked''. Eg
 
*<nowiki>{{BRC|158|ns|9}}</nowiki> produces [[British Rail Class 158|158/9s]]
 
*<nowiki>{{BRC|158||0}}</nowiki> produces [[British Rail Class 158|Class 158/0]]
 
}}
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
[[Category:Internal link templates]]
 
[[Category:United Kingdom rail transport templates]]
 
 
</noinclude>
 
</noinclude>

Revision as of 10:24, 27 December 2015

[[British Rail Class {{{1}}}|Class {{{1}}}]]

Template documentation[view] [edit] [history] [purge]

Usage

This template links to the British Rail Class #, e.g. {{BRC|158}} produces a link to Class 158.

There are several display options, selected by adding a second parameter as follows.

2nd parameter Meaning Usage Result
f Full {{BRC|158|f}} British Rail Class 158
fs Full (plural) {{BRC|158|fs}} British Rail Class 158s
c Class (default) {{BRC|158|c}} or {{BRC|158}} Class 158
cs Class (plural) {{BRC|158|cs}} Class 158s
n Number {{BRC|158|n}} 158
ns Number (plural) {{BRC|158|ns}} Class 158s

You can also add a third parameter to indicate subclasses, however the link is still to the class page. E.g.