Template:State Entry Omit
Jump to navigation
Jump to search
This template serves to create an entry in the State templates if the first two parameters are identical. This is for detection if a parameter to the template using this one was empty.
Parameters:
- 1 and 2 = the state value to repesent (0, 1, 2, 3, 4, X, NA or empty) to display the respective icon (NA still being replaced with the empty string in order to keep compatibility with other templates).
- 1: The caller's parameter replaced with an empty string. This one will be used as the value.
- 2: The caller's parameter either non-replaced or replaced with a different string. It serves for detection of an omitted caller's argument, by comparison with the first parameter. If they are identical, an argument was passed for the parameter, if they differ, there was a replacement of an omitted parameter.
- 3 = the state name (part of the image file name)
- 4 = the extension (defaults to .svg)
- 5 = the state name to be displayed (defaults to parameter 3)
The icon name must be in the form State nameN.XXX
, where name is the name of the state (Car, Train etc.), N is the state (0..4, X, NA or empty for omission of the image) and XXX is the extension chosen.
The template can be called as
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car}}
{{t|State Entry Omit|{{{c|}}}|{{{c|dummy}}}|Car}}
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car|}}
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car||}}
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car|.svg}}
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car|.svg|}}
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car||Car}}
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car|.svg|Car}}
(those forms being identical due to the defaults)
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car||voiture}}
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car|.png}}
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car|.png|}}
{{t|State Entry Omit|{{{c|}}}|{{{c}}}|Car|.png|voiture}}