Difference between revisions of "Manual:Template/TemplateData"
Templates/files updated (unreviewed pages in bold): File:Manual:650px-vorlage-templatedata-beforesave.png, File:Manual:220px-vorlage-templatedata-schaltfäche.png, File:Manual:650px-vorlage-templatedata-fenster.png, File:Manual:650px-vorlage-templatedata-parameter-definieren.png, File:Manual:650px-vorlage-templatedata-editor.png, File:Manual:650px-vorlage-templatedata-quelltext.png, File:Manual:650px-vorlage-templatedata-output.png
[quality revision] | [pending revision] |
(Created page with "The extension ''TemplateData'' makes it easier for users to work with templates.") (Tag: Visual edit) |
(Tag: Visual edit) |
The TemplateData extension TemplateData makes it easier for users to work with templates. Here we will show you how to quickly create a template with parameters using TemplateData, whose values can then be easily entered by users via a form.
Features of TemplateData[edit | edit source]
-
Day
<templatedata>
: Description of template parameters (e.g. description, type, label) - Format: JSON
- Administration: Via "TemplateData" dialog in the VisualEditor
- Form: Users receive a form for data input
Describe template[edit | edit source]
Create a template with parameters. On the wiki pages where this template is included, you can then enter the values for the parameters. To make this as easy as possible for the users, describe the template and the parameters.
Save the template. After saving, the TemplateData button appears. Click on the button:
Enter a description for the template and save the form (1). Click on "Manage template data" again. Select "Block" as wikitext formatting (2). The parameters are clearly displayed in the source code of the wiki page in paragraph format.
The template editor has recognized the already existing parameters. You can now define them further. So click on "add suggested parameters" (3). You can then edit the parameters individually.
Click on the first parameter. The editing form appears.
Enter the information for this parameter (see the description of the input fields) and then click Done. Edit all parameters of your template.
After all parameters are described, click Apply on the main page of the template editor. The template source code now contains the template description in JSON format. To avoid this description being included on the wiki pages themselves, it is stored in the ... tag to exclude it from inclusion.
Now save the template. In view mode, the description of the template is now displayed with the parameters.
Über der Beschreibung wird die Vorlage selbst angezeigt. Diese Anzeige kann unterbunden werden, indem die Vorlage in das Tag eingeschlossen wird.
Description of the parameter input fields[edit | edit source]
Key | Type | Default | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name
|
InterfaceText |
null
|
A very short name for the parameter (e.g. under 20 characters) | ||||||||||||||||||||||||||||
Aliasse
|
Array containing strings |
[]
|
List of alias names. An alias is an alternative name for a parameter. It can be used instead of (but not in addition to) the primary name. Alias names are not documented in a separate parameter object. If they need more information, they should be given their own attribute, which is marked as "obsolete". | ||||||||||||||||||||||||||||
Description | InterfaceText |
null
|
A short description of the parameter so that users know which one to select from a drop-down list. | ||||||||||||||||||||||||||||
required | boolean |
false
|
Whether the parameter must be specified for the template to work (value is "true" if this parameter must be specified) | ||||||||||||||||||||||||||||
proposed | boolean |
false
|
Whether the parameter is suggested for the template to be useful (true if this parameter should be specified). | ||||||||||||||||||||||||||||
obsolete | boolean or string |
false
|
Whether the parameter is deprecated. The value can be a string of instructions giving the user guidance what instead can be done, or be simply true .
|
||||||||||||||||||||||||||||
Standard
|
InterfaceText |
null
|
The default value that the template uses for this parameter if no value is specified, or a description of it. | ||||||||||||||||||||||||||||
Autowert
|
string |
null
|
A dynamically-generated default value in wikitext, such as today's date or the editing user's name; this will often involve wikitext substitution, such as {{subst:CURRENTYEAR}} .
|
||||||||||||||||||||||||||||
Example | InterfaceText |
null
|
Example text for the user to enter a suitable value. | ||||||||||||||||||||||||||||
Typ
|
string |
"unknown"
|
The parameter type, as (soft) type hint. One of the following:
|
The TemplateData extension ''TemplateData'' makes it easier for users to work with templates.makes it easier for users to work with templates. Here we will show you how to quickly create a template with parameters using TemplateData, whose values can then be easily entered by users via a form. == Features of TemplateData == * '''Day''' '''<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);"><nowiki><templatedata></nowiki></code>''': Description of template parameters (e.g. description, type, label) * '''Format:''' JSON * '''Administration''': Via "TemplateData" dialog in the VisualEditor * '''Form''': Users receive a form for data input == Describe template == Create a template with parameters. On the wiki pages where this template is included, you can then enter the values for the parameters. To make this as easy as possible for the users, describe the template and the parameters. [[File:Manual:650px-vorlage-templatedata-beforesave.png|left|thumb|650x650px]] Save the template. After saving, the TemplateData button appears. Click on the button: [[File:Manual:220px-vorlage-templatedata-schaltfäche.png|center|thumb]] Enter a description for the template and save the form (1). Click on "Manage template data" again. Select "Block" as wikitext formatting (2). The parameters are clearly displayed in the source code of the wiki page in paragraph format. [[File:Manual:650px-vorlage-templatedata-fenster.png|center|thumb|689x689px]] The template editor has recognized the already existing parameters. You can now define them further. So click on "add suggested parameters" (3). You can then edit the parameters individually. [[File:Manual:650px-vorlage-templatedata-parameter-definieren.png|center|thumb|690x690px]] Click on the first parameter. The editing form appears. [[File:Manual:650px-vorlage-templatedata-editor.png|center|thumb|687x687px]] Enter the information for this parameter (see the description of the input fields) and then click Done. Edit all parameters of your template. After all parameters are described, click Apply on the main page of the template editor. The template source code now contains the template description in JSON format. To avoid this description being included on the wiki pages themselves, it is stored in the ... tag to exclude it from inclusion. [[File:Manual:650px-vorlage-templatedata-quelltext.png|center|thumb|650x650px]] Now save the template. In view mode, the description of the template is now displayed with the parameters. [[File:Manual:650px-vorlage-templatedata-output.png|center|thumb|650x650px]] <span style="color: rgb(51, 51, 51)">Über der Beschreibung wird die Vorlage selbst angezeigt. Diese Anzeige kann unterbunden werden, indem die Vorlage in das</span> <span class="mw-lingo-term" style="color: rgb(51, 51, 51)" data-lingo-term-id="c101058e7ea21bbbf2a5ac893088e90b" data-hasqtip="2">Tag</span> <span style="color: rgb(51, 51, 51)">ei</span><code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"></code><span style="color: rgb(51, 51, 51)">ngeschlossen wird.</span> ====== Description of the parameter input fields ====== {| class="wikitable hw-responsive-data-table" style="box-sizing: inherit; border-collapse: collapse; border-spacing: 0px; background-color: rgb(248, 249, 250); font-size: 14px; color: rgb(34, 34, 34); margin: 1em 0px; border: 1px solid rgb(162, 169, 177); font-family: Roboto, arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;" ! style="background-color:rgb(234, 236, 240);text-align:center;" |Key ! style="background-color:rgb(234, 236, 240);text-align:center;" |Type ! style="background-color:rgb(234, 236, 240);text-align:center;" |Default ! style="background-color:rgb(234, 236, 240);text-align:center;" |Description |- style="box-sizing: inherit;" | style="" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Name</code> | style="" |[https://www.mediawiki.org/wiki/Extension:TemplateData?action=view#InterfaceText_.28string_or_object.29 InterfaceText] | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">null</code> | style="" |A very short name for the parameter (e.g. under 20 characters) |- style="box-sizing: inherit;" | style="" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Aliasse</code> | style="" |Array containing strings | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">[]</code> | style="" |List of alias names. An alias is an alternative name for a parameter. It can be used instead of (but not in addition to) the primary name. Alias names are not documented in a separate parameter object. If they need more information, they should be given their own attribute, which is marked as "obsolete". |- style="box-sizing: inherit;" | style="" |Description | style="" |[https://www.mediawiki.org/wiki/Extension:TemplateData?action=view#InterfaceText_.28string_or_object.29 InterfaceText] | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">null</code> | style="" |A short description of the parameter so that users know which one to select from a drop-down list. |- style="box-sizing: inherit;" | style="" |required | style="" |boolean | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">false</code> | style="" |Whether the parameter must be specified for the template to work (value is "true" if this parameter must be specified) |- style="box-sizing: inherit;" | style="" |proposed | style="" |boolean | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">false</code> | style="" |Whether the parameter is suggested for the template to be useful (true if this parameter '''should''' be specified). |- style="box-sizing: inherit;" | style="" |obsolete | style="" |boolean or string | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">false</code> | style="" |Whether the parameter is deprecated. The value can be a string of instructions giving the user guidance what instead can be done, or be simply <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">true</code>. |- style="box-sizing: inherit;" | style="" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Standard</code> | style="" |[https://www.mediawiki.org/wiki/Extension:TemplateData?action=view#InterfaceText_.28string_or_object.29 InterfaceText] | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">null</code> | style="" |The default value that the template uses for this parameter if no value is specified, or a description of it. |- style="box-sizing: inherit;" | style="" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Autowert</code> | style="" |string | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">null</code> | style="" |A dynamically-generated default value in wikitext, such as today's date or the editing user's name; this will often involve wikitext substitution, such as <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);"><nowiki>{{subst:CURRENTYEAR}}</nowiki></code>. |- style="box-sizing: inherit;" | style="" |Example | style="" |[https://www.mediawiki.org/wiki/Extension:TemplateData?action=view#InterfaceText_.28string_or_object.29 InterfaceText] | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">null</code> | style="" |Example text for the user to enter a suitable value. |- style="box-sizing: inherit;" | style="" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Typ</code> | style="" |string | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">"unknown"</code> | style="" |The parameter type, as (soft) type hint. One of the following: {| class="wikitable hw-responsive-data-table" id="parameter_types" style="box-sizing: inherit; border-collapse: collapse; border-spacing: 0px; background-color: rgb(248, 249, 250); font-size: 14px; color: rgb(34, 34, 34); margin: 1em 0px; border: 1px solid rgb(162, 169, 177);" ! style="background-color:rgb(234, 236, 240);text-align:center;" |String Value ! style="background-color:rgb(234, 236, 240);text-align:center;" |Type of Parameter |- style="box-sizing: inherit;" | style="" |"unknown" | style="" |Assumed type if not set |- style="box-sizing: inherit;" | style="" |"number" | style="" |Any numerical value (without decimal points or thousand separators) |- style="box-sizing: inherit;" | style="" |"string" | style="" |Any textual value. May contain line breaks. |- style="box-sizing: inherit;" | style="" |"line" | style="" |Short text field – use for names, labels, and other short-form fields. This is supposed to be text that is not expected to contain line breaks. |- style="box-sizing: inherit;" | style="" |"boolean" | style="" |A boolean value (<nowiki>'1' for true, '0' for false, ''</nowiki> for unknown), see [https://en.wikipedia.org/wiki/Three-valued_logic?action=view three-valued logic]. |- style="box-sizing: inherit;" | style="" |"date" | style="" |A date in ISO 8601 format, e.g. "2014-05-09" or "2014-05-09T16:01:12Z" |- style="box-sizing: inherit;" | style="" |"url" | style="" |A URL, including protocol, e.g. "<nowiki>http://www.example.org</nowiki>", "<span class="mw-lingo-term" data-lingo-term-id="5e056c500a1c4b6a7110b50d807bade5" data-hasqtip="3" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">https</span>://example.org", or "//example.org". |- style="box-sizing: inherit;" | style="" |"wiki-page-name" | style="" |A valid MediaWiki page name for the current wiki. Doesn't have to exist, but if not, should be a valid page name which could be created. |- style="box-sizing: inherit;" | style="" |"wiki-file-name" | style="" |A valid MediaWiki file name for the current wiki. Doesn't have to exist, but if not, should be a valid file name which could be uploaded. Should not include the namespace (''e.g.'' "Foo.svg" not "File:Foo.svg" or "Bild:Foo.svg"). |- style="box-sizing: inherit;" | style="" |"wiki-template-name" | style="" |A valid MediaWiki Template name for the current wiki. |- style="box-sizing: inherit;" | style="" |"wiki-user-name" | style="" |A valid MediaWiki user name for the current wiki. Doesn't have to exist, but if not, should be a valid user name which could be created. Should not include the namespace (''e.g.'' "Foo" not "User:Foo" or "Usario:Foo"). |- style="box-sizing: inherit;" | style="" |"content" | style="" |Page content in wikitext, such as text style, links, images, ''etc.'' |- style="box-sizing: inherit;" | style="" |<span style="box-sizing: inherit; white-space: nowrap;">"unbalanced-wikitext"</span> | style="" |Raw wikitext that should not be treated as standalone content because it is unbalanced – for example, templates concatenating incomplete wikitext as a bigger whole, such as <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);"><nowiki>{{echo|before=<u>|after=</u>}}</nowiki></code> |} |}
Line 1: | Line 1: | ||
− | The extension ''TemplateData'' | + | The TemplateData extension makes it easier for users to work with templates. Here we will show you how to quickly create a template with parameters using TemplateData, whose values can then be easily entered by users via a form. |
+ | |||
+ | == Features of TemplateData == | ||
+ | |||
+ | * '''Day''' '''<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);"><nowiki><templatedata></nowiki></code>''': Description of template parameters (e.g. description, type, label) | ||
+ | * '''Format:''' JSON | ||
+ | * '''Administration''': Via "TemplateData" dialog in the VisualEditor | ||
+ | * '''Form''': Users receive a form for data input | ||
+ | |||
+ | == Describe template == | ||
+ | Create a template with parameters. On the wiki pages where this template is included, you can then enter the values for the parameters. To make this as easy as possible for the users, describe the template and the parameters. | ||
+ | [[File:Manual:650px-vorlage-templatedata-beforesave.png|left|thumb|650x650px]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Save the template. After saving, the TemplateData button appears. Click on the button: | ||
+ | [[File:Manual:220px-vorlage-templatedata-schaltfäche.png|center|thumb]] | ||
+ | Enter a description for the template and save the form (1). Click on "Manage template data" again. Select "Block" as wikitext formatting (2). The parameters are clearly displayed in the source code of the wiki page in paragraph format. | ||
+ | [[File:Manual:650px-vorlage-templatedata-fenster.png|center|thumb|689x689px]] | ||
+ | The template editor has recognized the already existing parameters. You can now define them further. So click on "add suggested parameters" (3). You can then edit the parameters individually. | ||
+ | [[File:Manual:650px-vorlage-templatedata-parameter-definieren.png|center|thumb|690x690px]] | ||
+ | Click on the first parameter. The editing form appears. | ||
+ | [[File:Manual:650px-vorlage-templatedata-editor.png|center|thumb|687x687px]] | ||
+ | Enter the information for this parameter (see the description of the input fields) and then click Done. Edit all parameters of your template. | ||
+ | |||
+ | |||
+ | After all parameters are described, click Apply on the main page of the template editor. The template source code now contains the template description in JSON format. To avoid this description being included on the wiki pages themselves, it is stored in the ... tag to exclude it from inclusion. | ||
+ | [[File:Manual:650px-vorlage-templatedata-quelltext.png|center|thumb|650x650px]] | ||
+ | Now save the template. In view mode, the description of the template is now displayed with the parameters. | ||
+ | [[File:Manual:650px-vorlage-templatedata-output.png|center|thumb|650x650px]] | ||
+ | <span style="color: rgb(51, 51, 51)">Über der Beschreibung wird die Vorlage selbst angezeigt. Diese Anzeige kann unterbunden werden, indem die Vorlage in das</span> <span class="mw-lingo-term" style="color: rgb(51, 51, 51)" data-lingo-term-id="c101058e7ea21bbbf2a5ac893088e90b" data-hasqtip="2">Tag</span> <span style="color: rgb(51, 51, 51)">ei</span><code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"></code><span style="color: rgb(51, 51, 51)">ngeschlossen wird.</span> | ||
+ | |||
+ | ====== Description of the parameter input fields ====== | ||
+ | {| class="wikitable hw-responsive-data-table" style="box-sizing: inherit; border-collapse: collapse; border-spacing: 0px; background-color: rgb(248, 249, 250); font-size: 14px; color: rgb(34, 34, 34); margin: 1em 0px; border: 1px solid rgb(162, 169, 177); font-family: Roboto, arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;" | ||
+ | ! style="background-color:rgb(234, 236, 240);text-align:center;" |Key | ||
+ | ! style="background-color:rgb(234, 236, 240);text-align:center;" |Type | ||
+ | ! style="background-color:rgb(234, 236, 240);text-align:center;" |Default | ||
+ | ! style="background-color:rgb(234, 236, 240);text-align:center;" |Description | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Name</code> | ||
+ | | style="" |[https://www.mediawiki.org/wiki/Extension:TemplateData?action=view#InterfaceText_.28string_or_object.29 InterfaceText] | ||
+ | | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">null</code> | ||
+ | | style="" |A very short name for the parameter (e.g. under 20 characters) | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Aliasse</code> | ||
+ | | style="" |Array containing strings | ||
+ | | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">[]</code> | ||
+ | | style="" |List of alias names. An alias is an alternative name for a parameter. It can be used instead of (but not in addition to) the primary name. Alias names are not documented in a separate parameter object. If they need more information, they should be given their own attribute, which is marked as "obsolete". | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |Description | ||
+ | | style="" |[https://www.mediawiki.org/wiki/Extension:TemplateData?action=view#InterfaceText_.28string_or_object.29 InterfaceText] | ||
+ | | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">null</code> | ||
+ | | style="" |A short description of the parameter so that users know which one to select from a drop-down list. | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |required | ||
+ | | style="" |boolean | ||
+ | | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">false</code> | ||
+ | | style="" |Whether the parameter must be specified for the template to work (value is "true" if this parameter must be specified) | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |proposed | ||
+ | | style="" |boolean | ||
+ | | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">false</code> | ||
+ | | style="" |Whether the parameter is suggested for the template to be useful (true if this parameter '''should''' be specified). | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |obsolete | ||
+ | | style="" |boolean or string | ||
+ | | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">false</code> | ||
+ | | style="" |Whether the parameter is deprecated. The value can be a string of instructions giving the user guidance what instead can be done, or be simply <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">true</code>. | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Standard</code> | ||
+ | | style="" |[https://www.mediawiki.org/wiki/Extension:TemplateData?action=view#InterfaceText_.28string_or_object.29 InterfaceText] | ||
+ | | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">null</code> | ||
+ | | style="" |The default value that the template uses for this parameter if no value is specified, or a description of it. | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Autowert</code> | ||
+ | | style="" |string | ||
+ | | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">null</code> | ||
+ | | style="" |A dynamically-generated default value in wikitext, such as today's date or the editing user's name; this will often involve wikitext substitution, such as <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);"><nowiki>{{subst:CURRENTYEAR}}</nowiki></code>. | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |Example | ||
+ | | style="" |[https://www.mediawiki.org/wiki/Extension:TemplateData?action=view#InterfaceText_.28string_or_object.29 InterfaceText] | ||
+ | | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">null</code> | ||
+ | | style="" |Example text for the user to enter a suitable value. | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Typ</code> | ||
+ | | style="" |string | ||
+ | | style="text-align:center;" |<code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">"unknown"</code> | ||
+ | | style="" |The parameter type, as (soft) type hint. One of the following: | ||
+ | {| class="wikitable hw-responsive-data-table" id="parameter_types" style="box-sizing: inherit; border-collapse: collapse; border-spacing: 0px; background-color: rgb(248, 249, 250); font-size: 14px; color: rgb(34, 34, 34); margin: 1em 0px; border: 1px solid rgb(162, 169, 177);" | ||
+ | ! style="background-color:rgb(234, 236, 240);text-align:center;" |String Value | ||
+ | ! style="background-color:rgb(234, 236, 240);text-align:center;" |Type of Parameter | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"unknown" | ||
+ | | style="" |Assumed type if not set | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"number" | ||
+ | | style="" |Any numerical value (without decimal points or thousand separators) | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"string" | ||
+ | | style="" |Any textual value. May contain line breaks. | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"line" | ||
+ | | style="" |Short text field – use for names, labels, and other short-form fields. This is supposed to be text that is not expected to contain line breaks. | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"boolean" | ||
+ | | style="" |A boolean value (<nowiki>'1' for true, '0' for false, ''</nowiki> for unknown), see [https://en.wikipedia.org/wiki/Three-valued_logic?action=view three-valued logic]. | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"date" | ||
+ | | style="" |A date in ISO 8601 format, e.g. "2014-05-09" or "2014-05-09T16:01:12Z" | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"url" | ||
+ | | style="" |A URL, including protocol, e.g. "<nowiki>http://www.example.org</nowiki>", "<span class="mw-lingo-term" data-lingo-term-id="5e056c500a1c4b6a7110b50d807bade5" data-hasqtip="3" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">https</span>://example.org", or "//example.org". | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"wiki-page-name" | ||
+ | | style="" |A valid MediaWiki page name for the current wiki. Doesn't have to exist, but if not, should be a valid page name which could be created. | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"wiki-file-name" | ||
+ | | style="" |A valid MediaWiki file name for the current wiki. Doesn't have to exist, but if not, should be a valid file name which could be uploaded. Should not include the namespace (''e.g.'' "Foo.svg" not "File:Foo.svg" or "Bild:Foo.svg"). | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"wiki-template-name" | ||
+ | | style="" |A valid MediaWiki Template name for the current wiki. | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"wiki-user-name" | ||
+ | | style="" |A valid MediaWiki user name for the current wiki. Doesn't have to exist, but if not, should be a valid user name which could be created. Should not include the namespace (''e.g.'' "Foo" not "User:Foo" or "Usario:Foo"). | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |"content" | ||
+ | | style="" |Page content in wikitext, such as text style, links, images, ''etc.'' | ||
+ | |- style="box-sizing: inherit;" | ||
+ | | style="" |<span style="box-sizing: inherit; white-space: nowrap;">"unbalanced-wikitext"</span> | ||
+ | | style="" |Raw wikitext that should not be treated as standalone content because it is unbalanced – for example, templates concatenating incomplete wikitext as a bigger whole, such as <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 12.6px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);"><nowiki>{{echo|before=<u>|after=</u>}}</nowiki></code> | ||
+ | |} | ||
+ | |} |