Difference between revisions of "Template:BSsrws/doc"
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 | + | 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 " | + | * 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 " | + | * 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 " | + | * The fourth parameter (alternatively "{{para|4}}") will change both lines to ''italic'' text. Any character or text can be used. |
| − | * The fifth parameter (alternatively " | + | * 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 " | + | * 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 " | + | * 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). |
| − | + | For example: | |
| − | * <code><nowiki>{{BSsrws|Stratford|International}}</nowiki></code> | + | * <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> | + | * <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 | ||
| − | + | {{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
| This is a documentation subpage for Template:BSsrws. It contains usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
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 stationare 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:
{{BSsrws|Stratford|International}}links to[[Stratford International railway station]]and displays
.Stratford International {{BSsrws|Stratford|International|station|it}}links to[[Stratford International station]]and displays
.Stratford International
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