Wikipedia:TemplateData/Tutorial: Difference between revisions
Content deleted Content added
CaroleHenson (talk | contribs) consolidate info from 2 areas |
CaroleHenson (talk | contribs) TemplateData |
||
Line 4:
== How to use TemplateData ==
===The structure of TemplateData ===
TemplateData's structure is based around the "JSON" standard, and is fairly simple. The first thing to do is to type out a pair of <nowiki><
<pre>
<TemplateData>
TemplateData goes here
</TemplateData>
</pre>
This tells the software that everything between the two tags is TemplateData, and should be referenced when the template is used. The TemplateData itself follows a standard layout that identifies the parameters that may be set within the template.
===
The
Although it may go anywhere on the template pages, some editors enter the data after the descriptive information about the template and before the "See also" section.
Line 24:
Determine what parameters are or may be used in the template. In some cases, it's values within < >, (e.g., in "<nowiki>{{Str left|<string>|<count>}}</nowiki>", it's string and count.) It could also be parameters passed with equal signs. For instance, the <nowiki>{{cite web...</nowiki> template is passed values to complete a citation, such as url=, title=, accessdate=, etc. The template documentation may summarize what parameters are or may be set for the template.
===Completing the
The first value in the
Then, for each parameter used by the template, complete the following "params" information:
Line 65:
This would display in the template like so:
<templatedata>
{
|