Wikipedia:TemplateData/Tutorial: Difference between revisions
Content deleted Content added
Salix alba (talk | contribs) add links to yet another template data editor and the main mediawiki doc page |
Salix alba (talk | contribs) →Completing the TemplateData information: add details on aliases, deprectated and inherits |
||
Line 40:
:** <code>"default"</code> contains the default value of this parameter (in quotes). The information can be skipped, if the parameter has no default value as in this example.
:** <code>"required"</code> controls whether filling out the parameter is mandatory for that template. Enter <code>true</code> if the value is required for the template and <code>false</code> if it is not required. In this case, both count and sub_string are required values.
:** <code>"aliases"</code> (optional) List of aliases eg <code>"aliases": [ "2", "Caption", "imagecaption" ]</code>. An alias is an alternative name for the parameter that may be used instead of (not in addition to) the primary name. Aliases are not documented in a separate parameter object. If they need more information, they should be in their own property marked "deprecated".
:** <code>"deprecated"</code> (optional) Tooltip for the user detailing the intent for the deprecated parameters, a boolean or string value.
:** <code>"inherits"</code> (optional) Key to another parameter. The current parameter will inherit from that one, with local properties overriding the inherited ones.
:* Where there are more than one parameter passed to the template, add a comma after the close bracket, <code>},</code> between the parms values.
|