3,860
edits
(Added info on the option to output value via Template:Varserif.) |
|||
Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
There are | There are 5 parameters, of which 2 are unnamed and 3 are named. All five parameters are optional. | ||
===Syntax=== | ===Syntax=== | ||
The template's syntax is | The template's syntax is | ||
* {{tlc|para|''parameter'' |''value'' |equal{{=}}yes |plain{{=}}yes }} | * {{tlc|para|''parameter'' |''value'' |serif{{=}}yes |equal{{=}}yes |plain{{=}}yes }} | ||
By default, the | By default, the three toggle parameters, {{para|serif}}, {{para|equal}} and {{para|plain}}, are not used. They can only be invoked by explicitly setting them to the value {{samp|''yes''}}. Any other value will keep them switched off. | ||
===Optional parameters=== | ===Optional parameters=== | ||
Line 35: | Line 35: | ||
;Notes | ;Notes | ||
* This parameter can be used in three ways: | * This parameter can be used in three ways: | ||
*# ''{{ | *# ''{{para|1}} filled in'': shows the parameter value after the parameter name, and following an equals sign; | ||
*# ''{{ | *# ''{{para|1}} empty'': (see above) shows the value without a preceding equals sign, as if for an unnamed parameter; or | ||
*# ''skipped'': only the parameter name will be displayed (if entered). | *# ''skipped'': only the parameter name will be displayed (if entered). | ||
* Can be wiki-formatted, with one exception: italic output is preset, and cannot be changed. | * Can be wiki-formatted, with one exception: italic output is preset, and cannot be changed. | ||
Line 43: | Line 43: | ||
;Usage | ;Usage | ||
* {{tlc|para|1|<big>'''2'''</big>}} | * {{tlc|para|1|<big>'''2'''</big>}} | ||
====serif==== | |||
;<big>Value output in serif font</big> | |||
You can override the default output styling for the ''parameter value'' parameter ({{para|2}}), by using this parameter. The output will style the output using {{tlf|varserif}}, instead of the default meta-template, {{tlf|var}}. | |||
By default, this parameter isn't used. It can only be invoked by explicitly setting it to the value {{samp|''yes''}}. Any other value will keep it switched off. | |||
;Notes | |||
* This parameter only affects the look of parameter {{para|2}} (the ''parameter value''). | |||
;Usage | |||
* {{tlc|para|1|2|<big>'''serif'''{{=}}''yes''</big>}} | |||
====equal==== | ====equal==== | ||
Line 51: | Line 63: | ||
;Notes | ;Notes | ||
* This parameter only works when the parameter name ({{ | * This parameter only works when the parameter name ({{para|1}}) is entered '''without being followed by a parameter value''' (i.e. not entering anything for the ''parameter value'' parameter, {{para|2}}). | ||
* If the ''parameter value'' parameter ({{ | * If the ''parameter value'' parameter ({{para|2}}) is defined, it will have precedence over {{para|equal}}. | ||
;Usage | ;Usage | ||
Line 59: | Line 71: | ||
====plain==== | ====plain==== | ||
;<big>Plain text styling</big> | ;<big>Plain text styling</big> | ||
You can override the default output styling by using this parameter. The output will inherit the CSS value for {{code|background-color}} and set {{code|border}} to {{samp|none}}. | You can override the default output styling, by using this parameter. The output will inherit the CSS value for {{code|background-color}} and set {{code|border}} to {{samp|none}}. | ||
By default, this parameter isn't used. It can only be invoked by explicitly setting it to the value {{samp|''yes''}}. Any other value will keep it switched off. | By default, this parameter isn't used. It can only be invoked by explicitly setting it to the value {{samp|''yes''}}. Any other value will keep it switched off. | ||
Line 77: | Line 89: | ||
| Only parameter || {{tlc|para|parameter}} || {{para|parameter}} | | Only parameter || {{tlc|para|parameter}} || {{para|parameter}} | ||
|- | |- | ||
| | | Only value || {{tlc|para||value}} || {{para||value}} | ||
|- | |- | ||
| | | {{para|serif}} || {{tlc|para|parameter|value|serif{{=}}yes}} || {{para|parameter|value|serif=yes}} | ||
|- | |||
| {{para|equal}} || {{tlc|para|parameter|equal{{=}}yes}} || {{para|parameter|equal=yes}} | |||
|- | |||
| {{para|plain}} || {{tlc|para|parameter|value|plain{{=}}yes}} || {{para|parameter|value|plain=yes}} | |||
|- | |- | ||
| {{ | | {{para|serif}} and {{para|plain}} || {{tlc|para|parameter|value|serif{{=}}yes|plain{{=}}yes}} || {{para|parameter|value|serif=yes|plain=yes}} | ||
|- | |- | ||
| rowspan="4" | Using {{tlf|!}} || <code><nowiki>{{para|{{!}}parameter|value}}</nowiki></code> || {{para|{{!}}parameter|value}} | | rowspan="4" | Using {{tlf|!}} || <code><nowiki>{{para|{{!}}parameter|value}}</nowiki></code> || {{para|{{!}}parameter|value}} |
edits