Template:UK colour template doc/doc
This is a documentation subpage for Template:UK colour template doc. It may contain usage information, categories and other content that is not part of the original template page. |
This template lists as a wikitable row a template name, an argument (if needed), a color sample, its hex triplet, the relevant article, and optional additional text.
|
Sample: | hexval
|
page text |
Usage
[edit]The template itself is contained between table start and end markup:
{| class="wikitable"
{{UK colour template doc|template|argument}}
|}
argument
is used for both the page link and the colour template parameter. If no optional parameters are specified, then argument
is used ‘as is’ for the page link, and the last word of argument
is removed and the result is used as the colour template parameter.
argument
can be omitted if the color template has only one value, or it is desired to show the default color.
There are four optional named parameters:
arg
- used when the colour template parameter is not a short version of the linked page.
colour
- used when there is no appropriate colour template.
link
- used when there is no colour template or the colour template parameter is omitted.
link=none
will suppress a link.
- used when there is no colour template or the colour template parameter is omitted.
text
- optional additional text.
Examples
[edit]Code: {{UK colour template doc|London Underground|Piccadilly}}
(colour template and parameter)
Result:
{{rail color|London Underground|Piccadilly}}
|
Sample: | 10069f
|
Piccadilly |
Code: {{UK colour template doc|Tramlink}}
(parameter is not short form of page link)
Result:
{{rail color|Tramlink}}
|
Sample: | 78be20
|
Tramlink |
Code: {{UK colour template doc|link=City Cruises|colour=007fff}}
(no colour template)
Result:
{{Temporary rail colour|007fff}}
|
Sample: | 007fff
|
City Cruises |
Note that omitting both parameters 1 and 2 and the optional page link will produce an error:
Code: {{UK colour template doc|text=Catamaran Cruisers|colour=e75480}}
(no colour template or page link)
Result:
{{Temporary rail colour|e75480}}
|
Sample: | e75480
|
[[]] Catamaran Cruisers |
… unless |link=none
is included:
Code: {{UK colour template doc|text=Catamaran Cruisers|colour=e75480|link=none}}
(no colour template or page link)
Result:
{{Temporary rail colour|e75480}}
|
Sample: | e75480
|
Catamaran Cruisers |
See also
[edit]- {{Rail color doc}}
- {{Color template doc}}