Template:KeyValue: Difference between revisions
Jump to navigation
Jump to search
Note:Don't forget to use Template:= to escape any "=" characters in the text.
mNo edit summary |
(Added documentation and fixed some minor things) |
||
Line 1: | Line 1: | ||
; {{#if: {{{deprecated|}}} | <del> }}{{{1}}} {{#if: {{{to|}}} | <span style="font-weight: normal | <noinclude> | ||
This template is used to generate Keyvalue definitions on entity pages. | |||
== Basic usage == | |||
<nowiki>{{KV|<name>|<variable type>|<description>}}</nowiki> | |||
{{note|Don't forget to use [[Template:=]] to escape any "{{=}}" characters in the text.}} | |||
== Named parameters == | |||
{| class=standard-table | |||
! Parameter || Description || Example || Preview | |||
|- | |||
| <code>deprecated</code> || Used to mark deprecated Keyvalues || <code><nowiki>{{KV|I'm deprecated|string|Really, don't use me anymore!|deprecated=1}}</nowiki></code> || {{KV|I'm deprecated|string|Really, don't use me anymore!|deprecated=1}} | |||
|- | |||
| <code>nofgd</code> || This Keyvalue isn't available in the official FGD. || <code><nowiki>{{KV|Add me to the FGD|boolean|Because I'm not there!|nofgd=1}}</nowiki></code> || {{KV|Add me to the FGD|boolean|Because I'm not there!|nofgd=1}} | |||
|- | |||
| <code>since</code> || This Keyvalue is available since this game. Uses the template <nowiki>{{<game> add}}</nowiki>. || <code><nowiki>{{KV|I like Alien Swarm|integer|I'm available in Portal 2, too!|since=AS}}</nowiki></code> || {{KV|I like Alien Swarm|integer|I'm available in Portal 2, too!|since=AS}} | |||
|- | |||
| <code>to</code> || Use this to define a set of Keyvalues with very similar names. || <code><nowiki>{{KV|Sound 01|to=Sound 24|string|There're many of us...}}</nowiki></code> || {{KV|Sound 01|to=Sound 24|string|There're many of us...}} | |||
|} | |||
<hr> | |||
</noinclude>; {{#if: {{{deprecated|}}} | <del> }}{{{1}}} {{#if: {{{to|}}} | <span style="font-weight: normal;">to</span> {{{to}}} }} {{#if: {{{2|}}} | {{KV Type|{{{2}}}}} }}{{#if: {{{deprecated|}}} | </del> }}{{#if: {{{since|}}} | {{{{{since}}} add}} }}{{#if: {{{nofgd|}}} | {{Not in FGD}} }} | |||
: {{#if: {{{deprecated|}}} | Deprecated. }}{{#if: {{{3|}}} | {{{3}}} | {{todo|add description}} }}<noinclude> | : {{#if: {{{deprecated|}}} | Deprecated. }}{{#if: {{{3|}}} | {{{3}}} | {{todo|add description}} }}<noinclude> | ||
[[Category:FGD Templates]] | [[Category:FGD Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 22:01, 9 June 2011
This template is used to generate Keyvalue definitions on entity pages.
Basic usage
{{KV|<name>|<variable type>|<description>}}

Named parameters
Parameter | Description | Example | Preview |
---|---|---|---|
deprecated |
Used to mark deprecated Keyvalues | {{KV|I'm deprecated|string|Really, don't use me anymore!|deprecated=1}} |
|
nofgd |
This Keyvalue isn't available in the official FGD. | {{KV|Add me to the FGD|boolean|Because I'm not there!|nofgd=1}} |
|
since |
This Keyvalue is available since this game. Uses the template {{<game> add}}. | {{KV|I like Alien Swarm|integer|I'm available in Portal 2, too!|since=AS}} |
|
to |
Use this to define a set of Keyvalues with very similar names. | {{KV|Sound 01|to=Sound 24|string|There're many of us...}} |
|
- {{{1}}}
- Todo: add description