Wikipedia:TemplateData/Tutorial: Difference between revisions

Content deleted Content added
Okeyes (WMF) (talk | contribs)
add
Squc (talk | contribs)
correcting feedback link
Line 48:
Within each subsection, the first tag is the name of the template parameter ''within the template'' - if the parameter is simply called "1", this tag would be "1". Next we have "label", in which you put a human-readable title for the parameter that will be displayed within the template editor. We then have "description" - this time a description of the parameter, not of the template as a whole. After that we have "type", which controls how the template editor will interpret that parameter. This can be "string" (a set of characters, like this sentence!), "number" (a set of digits), "string/wiki-user-name" or "string/wiki-page-name". We then have "required", which can be set to either true or false; this simply controls whether filling out the parameter is mandatory for that template.
 
If you have multiple parameters, just repeat each section (starting from the "Category" tag) and fill it out as you see fit. Once you're done, hit "save". If you've made errors, it will not let you save - which we appreciate is disruptive, but means you can't break anything. Should you run into errors, explain on the [[Wikipedia:VisualEditor/Feedback|feedback page]] what you were trying to do, and we'll be happy to help.
 
== Limitations and questions ==