Difference between revisions of "Template:BSsrws/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jc86035
m
imported>Useddenim
Line 3: Line 3:
 
{{Lua|Module:Routemap}}
 
{{Lua|Module:Routemap}}
  
== Usage ==
+
=== Usage ===
  
This template displays a [[railway station]] name split over two lines of text in a text field of a [[Wikipedia:Route diagram template|route diagram]] created with {{tl|BS-map}}.
+
This template expands a name – split over two lines – to link to the appropriate railway station article, without displaying "railway station".
  
* The text will inherit the alignment of the parent cell, but can be overridden by applying the parameter "<code>align=left</code>" or "<code>align=right</code>".
+
* The text will inherit the alignment of the parent cell, but can be overridden by applying the parameter "{{para|align|left}}" or "{{para|align|right}}".
 
* The first and second parameters are the two lines. They are combined to form the station name. The words <code>railway station</code> are not needed.
 
* The first and second parameters are the two lines. They are combined to form the station name. The words <code>railway station</code> are not needed.
* The third parameter (alternatively "<code>3=</code>" or "<code>S=</code>") will change the default words "railway station" in the link to its contents.
+
* The third parameter (alternatively "{{para|3}}" or "{{para|S}}") will change the default words "railway station" in the link to its contents.
* The fourth parameter (alternatively "<code>4=</code>") will change both lines to ''italic'' text. Any character or text can be used.
+
* The fourth parameter (alternatively "{{para|4}}") will change both lines to ''italic'' text. Any character or text can be used.
* The fifth parameter (alternatively "<code>5=</code>") will change both lines to '''bold''' text. Any character or text can be used.
+
* The fifth parameter (alternatively "{{para|5}}") will change both lines to '''bold''' text. Any character or text can be used.
* The separating line can be forced to appear by providing an argument for the parameter "<code>line=</code>''anything''".
+
* The separating line can be forced to appear by providing an argument for the parameter "{{para|line|''anything''}}".
* Background colors can be specified by providing a valid [[Web colors#HTML color names|html color]] or [[Web colors#Hex triplet|hex triplet]] for the parameters "<code>bg1=</code>" (top line) and "<code>bg2=</code>" (bottom line).
+
* Background colors can be specified by providing a valid [[Web colors#HTML color names|html color]] or [[Web colors#Hex triplet|hex triplet]] for the parameters "{{para|bg1}}" (top line) and "{{para|bg2}}" (bottom line).
  
=== Examples ===
+
For example:
* <code><nowiki>{{BSsrws|Stratford|International}}</nowiki></code> displays {{BSsrws|Stratford|International}} and links to [[Stratford International railway station|<nowiki>[[Stratford International railway station]]</nowiki>]].
+
* <code><nowiki>{{BSsrws|Stratford|International}}</nowiki></code> links to <code>[[Stratford International railway station|<nowiki>[[Stratford International railway station]]</nowiki>]]</code> and displays {{BSsrws|Stratford|International}}.
* <code><nowiki>{{BSsrws|Stratford|International|station|it}}</nowiki></code> displays {{BSsrws|Stratford|International|station|it}} and links to [[Stratford International station|<nowiki>[[Stratford International station]]</nowiki>]].
+
* <code><nowiki>{{BSsrws|Stratford|International|station|it}}</nowiki></code> links to <code>[[Stratford International station|<nowiki>[[Stratford International station]]</nowiki>]]</code> and displays {{BSsrws|Stratford|International|station|it}}.
  
== Incorrect uses ==
+
=== Incorrect uses ===
  
 
If either line of text is empty, the page that the template is used on will be a member of [[:Category:Pages using BSto or BSsrws with missing text values]].
 
If either line of text is empty, the page that the template is used on will be a member of [[:Category:Pages using BSto or BSsrws with missing text values]].
  
== See also ==
+
=== See also ===
 
* {{tl|BSsplit}} for two lines of text with a [[wikilink]]
 
* {{tl|BSsplit}} for two lines of text with a [[wikilink]]
 
* {{tl|BSto}} for two lines of unequal-height text
 
* {{tl|BSto}} for two lines of unequal-height text
 
* {{tl|BScvt}} for two distances
 
* {{tl|BScvt}} for two distances
See [[project:ROUTE#Fractional text display template]] for usage instruction.
+
{{Stnlnk/doc/other}}
  
 
<includeonly>
 
<includeonly>
 
<!-- Categories and interwikis go here: -->
 
<!-- Categories and interwikis go here: -->
 
[[Category:Rail routemap templates|T]]
 
[[Category:Rail routemap templates|T]]
 
 
</includeonly>
 
</includeonly>

Revision as of 14:32, 3 December 2016

Usage

This template expands a name – split over two lines – to link to the appropriate railway station article, without displaying "railway station".

  • The text will inherit the alignment of the parent cell, but can be overridden by applying the parameter "|align=left" or "|align=right".
  • The first and second parameters are the two lines. They are combined to form the station name. The words railway station are not needed.
  • The third parameter (alternatively "|3=" or "|S=") will change the default words "railway station" in the link to its contents.
  • The fourth parameter (alternatively "|4=") will change both lines to italic text. Any character or text can be used.
  • The fifth parameter (alternatively "|5=") will change both lines to bold text. Any character or text can be used.
  • The separating line can be forced to appear by providing an argument for the parameter "|line=anything".
  • Background colors can be specified by providing a valid html color or hex triplet for the parameters "|bg1=" (top line) and "|bg2=" (bottom line).

For example:

Incorrect uses

If either line of text is empty, the page that the template is used on will be a member of Category:Pages using BSto or BSsrws with missing text values.

See also

  • {{BSsplit}} for two lines of text with a wikilink
  • {{BSto}} for two lines of unequal-height text
  • {{BScvt}} for two distances

Template:Stnlnk/doc/other