Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Tld: Difference between revisions

Template page
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:
<span style="font-family:monospace; {{#if:{{{nowrap|}}}| white-space:nowrap;}}">&#123;&#123;{{#if:{{{1|}}}|[[{{ns:10}}:{{{1}}}|{{{1}}}]]| tld&#124;...}}<!--
<onlyinclude><!--
--><templatestyles src="Template:Mono/styles.css" /><!--
-->{{#if:{{{nowrap|}}}|<templatestyles src="Template:Nowrap/styles.css" />}}<!--
--><span class="monospaced {{#if:{{{nowrap|}}}|nowrap}}"><!--
-->&#123;&#123;<!--
--><includeonly>[[{{ns:10}}:{{{1}}}|{{{1}}}]]</includeonly><!--
--><noinclude>tld&#124;...</noinclude><!--
-->{{#ifeq:{{{2|x}}}|{{{2|}}}| &#124;{{{2}}} | }}<!--
-->{{#ifeq:{{{2|x}}}|{{{2|}}}| &#124;{{{2}}} | }}<!--
-->{{#ifeq:{{{3|x}}}|{{{3|}}}| &#124;{{{3}}} | }}<!--
-->{{#ifeq:{{{3|x}}}|{{{3|}}}| &#124;{{{3}}} | }}<!--
Line 8: Line 14:
-->{{#ifeq:{{{8|x}}}|{{{8|}}}| &#124;{{{8}}} | }}<!--
-->{{#ifeq:{{{8|x}}}|{{{8|}}}| &#124;{{{8}}} | }}<!--
-->{{#ifeq:{{{9|x}}}|{{{9|}}}| &#124;{{{9}}} | }}<!--
-->{{#ifeq:{{{9|x}}}|{{{9|}}}| &#124;{{{9}}} | }}<!--
-->&#125;&#125;</span><noinclude>
-->&#125;&#125;<!--
{{documentation}}
--></span><!--
</noinclude>
--></onlyinclude>
{{Documentation}}

Revision as of 16:35, 25 June 2021

{{tld|...}}

Template documentation[ view · edit · history · purge ]
This documentation is transcluded from Template:Tld/doc.

TemplateData

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
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 TemplateDataCommons-specific information

Template link code with link

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Extra Class Namesclass

Extra class names to add to the “class” attribute.

Stringoptional
docdoc

Whether to display a linked “+/doc”

Booleanoptional
Nowrap?nowrap

Whether to add “<span style="white-space: nowrap">”

Auto value
1
Booleanoptional
Template1

Linked template name

Templaterequired
Parameter 12

First parameter value

Stringoptional
Parameter 23

Second parameter value

Stringoptional
Parameter 34

Third parameter value

Stringoptional
Parameter 45

Fourth parameter value

Stringoptional
Parameter 56

Fifth parameter value

Stringoptional
Parameter 67

Sixth parameter value

Stringoptional
Parameter 78

Seventh parameter value

Stringoptional
Parameter 89

Eighth parameter value

Stringoptional
  1. REDIRECT Commons:Link templates/Template links
Cookies help us deliver our services. By using our services, you agree to our use of cookies.