Template:Tld: Difference between revisions
More actions
follow-up of revision Special:Diff/124785777: change to use a <span> tag with monospace font via CSS. <code> tags have specific styling, which doesn't match the template documentation |
|||
| Line 1: | Line 1: | ||
< | <onlyinclude><!-- | ||
--><templatestyles src="Template:Mono/styles.css" /><!-- | |||
-->{{#if:{{{nowrap|}}}|<templatestyles src="Template:Nowrap/styles.css" />}}<!-- | |||
--><span class="monospaced {{#if:{{{nowrap|}}}|nowrap}}"><!-- | |||
-->{{<!-- | |||
--><includeonly>[[{{ns:10}}:{{{1}}}|{{{1}}}]]</includeonly><!-- | |||
--><noinclude>tld|...</noinclude><!-- | |||
-->{{#ifeq:{{{2|x}}}|{{{2|}}}| |{{{2}}} | }}<!-- | -->{{#ifeq:{{{2|x}}}|{{{2|}}}| |{{{2}}} | }}<!-- | ||
-->{{#ifeq:{{{3|x}}}|{{{3|}}}| |{{{3}}} | }}<!-- | -->{{#ifeq:{{{3|x}}}|{{{3|}}}| |{{{3}}} | }}<!-- | ||
| Line 8: | Line 14: | ||
-->{{#ifeq:{{{8|x}}}|{{{8|}}}| |{{{8}}} | }}<!-- | -->{{#ifeq:{{{8|x}}}|{{{8|}}}| |{{{8}}} | }}<!-- | ||
-->{{#ifeq:{{{9|x}}}|{{{9|}}}| |{{{9}}} | }}<!-- | -->{{#ifeq:{{{9|x}}}|{{{9|}}}| |{{{9}}} | }}<!-- | ||
-->}}</span>< | -->}}<!-- | ||
{{ | --></span><!-- | ||
--></onlyinclude> | |||
{{Documentation}} | |||
Revision as of 16:35, 25 June 2021
{{tld|...}}
TemplateData
- TemplateData
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.
Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1 or useTemplateData=only on the /doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.
Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.
Wikipedia's help about TemplateData • Commons-specific information
Template link code with link
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Extra Class Names | class | Extra class names to add to the “class” attribute. | String | optional |
| doc | doc | Whether to display a linked “+/doc” | Boolean | optional |
| Nowrap? | nowrap | Whether to add “<span style="white-space: nowrap">”
| Boolean | optional |
| Template | 1 | Linked template name | Template | required |
| Parameter 1 | 2 | First parameter value | String | optional |
| Parameter 2 | 3 | Second parameter value | String | optional |
| Parameter 3 | 4 | Third parameter value | String | optional |
| Parameter 4 | 5 | Fourth parameter value | String | optional |
| Parameter 5 | 6 | Fifth parameter value | String | optional |
| Parameter 6 | 7 | Sixth parameter value | String | optional |
| Parameter 7 | 8 | Seventh parameter value | String | optional |
| Parameter 8 | 9 | Eighth parameter value | String | optional |