Wikipedia:TemplateData/Tutorial: Difference between revisions

Content deleted Content added
m Completing the template data information: suggestedvalues can not have a space in it
Line 97:
|A date in [[ISO 8601]] format, e.g. "2014-05-09" or "2014-05-09T16:01:12Z"
|}
:* The <code>"'''suggested valuessuggestedvalues'''"</code> parameter property lets you define a list of parameter values to be shown to VisualEditor users for easy selection. Once the values have been added to TemplateData, the VisualEditor will display them in a combo box (a dropdown into which users can also enter a custom value). The user selects the desired value by clicking on it. For the suggested values to be displayed in the VisualEditor, the parameter’s type must be one of the following: content, line, string, number, unknown or unbalanced wikitext. Adding this parameter property can be done either in JSON or using the TemplateData Editor with no coding required. [[m:WMDE_Technical_Wishes/Suggested_values_for_template_parameters#TemplateData|Both methods are explained here.]]
:* <code>"inherits"</code>. This is a key to another parameter. The current parameter will inherit from that one, with local properties overriding the inherited ones. Very rare. '''Currently, the inclusion of this parameter in a <code><nowiki><templatedata></nowiki></code> sub-block will cause the page to produce a ''Required property "params." not found.'' error and will fail to generate the expected table.'''
<nowiki> </nowiki>Where more than one parameter sub-blocks is passed to the template, you must add a comma after the close brace, <code>},</code>, between the sub-blocks. Do not place a comma after the last sub-block in your set, but do make sure that there is a final close brace, <code>}</code>.