模板:High-use
This is the {{High-use}} message box.
It is meant to be put at the top of the documentation for templates used on more than 2000 pages.
For templates where the number of pages is more than 100,000 or if the first parameter is set as "risk" a stronger wording is given.
Note! It is normal that some of the links in the message box are red.
Usage
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
The template can be used as is, and will automatically use bot-updated transclusion counts from subpages of Module:Transclusion_count/data/ when available. But it can also take some parameters:
number of transclusions
: The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored if transclusion data is available for the current page (generally for templates with more than 2000 transclusions).discussion page, or use + notation
: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example,2=WP:VPT
will insert a link to WP:VPT),all-pages=yes
: Will also output what percentage of all pages use the template. This should only be used for very highly transcluded templates.info=extra information
: When set to non-blank, will insert extra information into the template text if the template has more than 10,000 transclusions or paramter 1 is set to "risk".demo=Template_name
: Will use the transclusion count for the template at Template:Template_name instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.form=
: When set to "editnotice", will display the message using {{editnotice}} instead of {{ombox}}.expiry=
: Sets the|expiry=
paramter for {{editnotice}}.
Examples
The full code for a /doc page top can look like this:
{{documentation subpage}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Standard form
{{high-use| 4,000 }} {{high-use| 4,000 | Wikipedia talk:High-risk templates }} {{high-use| | Wikipedia talk:High-risk templates }}
This is the {{High-use}} message box.
It is meant to be put at the top of the documentation for templates used on more than 2000 pages.
For templates where the number of pages is more than 100,000 or if the first parameter is set as "risk" a stronger wording is given.
Note! It is normal that some of the links in the message box are red.
Usage
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
The template can be used as is, and will automatically use bot-updated transclusion counts from subpages of Module:Transclusion_count/data/ when available. But it can also take some parameters:
number of transclusions
: The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored if transclusion data is available for the current page (generally for templates with more than 2000 transclusions).discussion page, or use + notation
: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example,2=WP:VPT
will insert a link to WP:VPT),all-pages=yes
: Will also output what percentage of all pages use the template. This should only be used for very highly transcluded templates.info=extra information
: When set to non-blank, will insert extra information into the template text if the template has more than 10,000 transclusions or paramter 1 is set to "risk".demo=Template_name
: Will use the transclusion count for the template at Template:Template_name instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.form=
: When set to "editnotice", will display the message using {{editnotice}} instead of {{ombox}}.expiry=
: Sets the|expiry=
paramter for {{editnotice}}.
Examples
The full code for a /doc page top can look like this:
{{documentation subpage}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Standard form
{{high-use| 4,000 }} {{high-use| 4,000 | Wikipedia talk:High-risk templates }} {{high-use| | Wikipedia talk:High-risk templates }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Rounding and + notation
{{high-use| 49,500 | demo=A template that does not exist }} {{high-use| 49,500+ | demo=A template that does not exist }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Editnotice form
{{high-use| form=editnotice }}
检查到模板循环:模板:High-use
High risk
{{high-use| demo=Yesno }} {{high-use| risk }} {{high-use| risk | Wikipedia talk:High-risk templates | all-pages = yes | info = This is a very large number! }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Technical details
The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
Ahechtbot compiles usage statistics for all templates with 2,000 or more transclusions using User:Ahechtbot/transclusioncount.py, and writes them to subpages of Module:Transclusion count/data (see Wikipedia:Bots/Requests for approval/Ahechtbot 6). These pages are usually updated every Sunday, but since running the query is resource intensive, it may be delayed or skipped if Wikipedia server usage is high. If a transclusion count is available in Module:Transclusion count/data, any manually input values will be ignored by this template.
Supporting templates and modules
See also
- {{Used in system}} – For templates used in the Wikipedia user interface.
- {{Intricate template}}
- {{pp-template}} – The protection template that usually is put on high-risk templates.
- Wikipedia:Template sandbox and test cases
- Wikipedia:High-risk templates
Template counters
- toollabs:templatecount/ – Easy to use, returns current (real time) transclusion count for a template.
- Wikipedia:Database reports/Templates transcluded on the most pages – Lists the 1000 most transcluded templates. Not updated since November 2018.
- Special:MostLinkedTemplates – Currently disabled for the English Wikipedia, but still runs for other Wikipedias so might be turned on again some day.
- tools:~dispenser/cgi-bin/embeddedincount.py – Seems to lack human interface, probably meant for programs to call.
- Special:PrefixIndex/Module:Transclusion_count/data/ Template count data used by this template. Broken down by first letter of template and rounded to two or three significant figures. Updated weekly.
This is the {{High-use}} message box.
It is meant to be put at the top of the documentation for templates used on more than 2000 pages.
For templates where the number of pages is more than 100,000 or if the first parameter is set as "risk" a stronger wording is given.
Note! It is normal that some of the links in the message box are red.
Usage
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
The template can be used as is, and will automatically use bot-updated transclusion counts from subpages of Module:Transclusion_count/data/ when available. But it can also take some parameters:
number of transclusions
: The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored if transclusion data is available for the current page (generally for templates with more than 2000 transclusions).discussion page, or use + notation
: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example,2=WP:VPT
will insert a link to WP:VPT),all-pages=yes
: Will also output what percentage of all pages use the template. This should only be used for very highly transcluded templates.info=extra information
: When set to non-blank, will insert extra information into the template text if the template has more than 10,000 transclusions or paramter 1 is set to "risk".demo=Template_name
: Will use the transclusion count for the template at Template:Template_name instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.form=
: When set to "editnotice", will display the message using {{editnotice}} instead of {{ombox}}.expiry=
: Sets the|expiry=
paramter for {{editnotice}}.
Examples
The full code for a /doc page top can look like this:
{{documentation subpage}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Standard form
{{high-use| 4,000 }} {{high-use| 4,000 | Wikipedia talk:High-risk templates }} {{high-use| | Wikipedia talk:High-risk templates }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Rounding and + notation
{{high-use| 49,500 | demo=A template that does not exist }} {{high-use| 49,500+ | demo=A template that does not exist }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Editnotice form
{{high-use| form=editnotice }}
检查到模板循环:模板:High-use
High risk
{{high-use| demo=Yesno }} {{high-use| risk }} {{high-use| risk | Wikipedia talk:High-risk templates | all-pages = yes | info = This is a very large number! }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Technical details
The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
Ahechtbot compiles usage statistics for all templates with 2,000 or more transclusions using User:Ahechtbot/transclusioncount.py, and writes them to subpages of Module:Transclusion count/data (see Wikipedia:Bots/Requests for approval/Ahechtbot 6). These pages are usually updated every Sunday, but since running the query is resource intensive, it may be delayed or skipped if Wikipedia server usage is high. If a transclusion count is available in Module:Transclusion count/data, any manually input values will be ignored by this template.
Supporting templates and modules
See also
- {{Used in system}} – For templates used in the Wikipedia user interface.
- {{Intricate template}}
- {{pp-template}} – The protection template that usually is put on high-risk templates.
- Wikipedia:Template sandbox and test cases
- Wikipedia:High-risk templates
Template counters
- toollabs:templatecount/ – Easy to use, returns current (real time) transclusion count for a template.
- Wikipedia:Database reports/Templates transcluded on the most pages – Lists the 1000 most transcluded templates. Not updated since November 2018.
- Special:MostLinkedTemplates – Currently disabled for the English Wikipedia, but still runs for other Wikipedias so might be turned on again some day.
- tools:~dispenser/cgi-bin/embeddedincount.py – Seems to lack human interface, probably meant for programs to call.
- Special:PrefixIndex/Module:Transclusion_count/data/ Template count data used by this template. Broken down by first letter of template and rounded to two or three significant figures. Updated weekly.
This is the {{High-use}} message box.
It is meant to be put at the top of the documentation for templates used on more than 2000 pages.
For templates where the number of pages is more than 100,000 or if the first parameter is set as "risk" a stronger wording is given.
Note! It is normal that some of the links in the message box are red.
Usage
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
The template can be used as is, and will automatically use bot-updated transclusion counts from subpages of Module:Transclusion_count/data/ when available. But it can also take some parameters:
number of transclusions
: The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored if transclusion data is available for the current page (generally for templates with more than 2000 transclusions).discussion page, or use + notation
: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example,2=WP:VPT
will insert a link to WP:VPT),all-pages=yes
: Will also output what percentage of all pages use the template. This should only be used for very highly transcluded templates.info=extra information
: When set to non-blank, will insert extra information into the template text if the template has more than 10,000 transclusions or paramter 1 is set to "risk".demo=Template_name
: Will use the transclusion count for the template at Template:Template_name instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.form=
: When set to "editnotice", will display the message using {{editnotice}} instead of {{ombox}}.expiry=
: Sets the|expiry=
paramter for {{editnotice}}.
Examples
The full code for a /doc page top can look like this:
{{documentation subpage}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Standard form
{{high-use| 4,000 }} {{high-use| 4,000 | Wikipedia talk:High-risk templates }} {{high-use| | Wikipedia talk:High-risk templates }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Rounding and + notation
{{high-use| 49,500 | demo=A template that does not exist }} {{high-use| 49,500+ | demo=A template that does not exist }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Editnotice form
{{high-use| form=editnotice }}
检查到模板循环:模板:High-use
High risk
{{high-use| demo=Yesno }} {{high-use| risk }} {{high-use| risk | Wikipedia talk:High-risk templates | all-pages = yes | info = This is a very large number! }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Technical details
The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
Ahechtbot compiles usage statistics for all templates with 2,000 or more transclusions using User:Ahechtbot/transclusioncount.py, and writes them to subpages of Module:Transclusion count/data (see Wikipedia:Bots/Requests for approval/Ahechtbot 6). These pages are usually updated every Sunday, but since running the query is resource intensive, it may be delayed or skipped if Wikipedia server usage is high. If a transclusion count is available in Module:Transclusion count/data, any manually input values will be ignored by this template.
Supporting templates and modules
See also
- {{Used in system}} – For templates used in the Wikipedia user interface.
- {{Intricate template}}
- {{pp-template}} – The protection template that usually is put on high-risk templates.
- Wikipedia:Template sandbox and test cases
- Wikipedia:High-risk templates
Template counters
- toollabs:templatecount/ – Easy to use, returns current (real time) transclusion count for a template.
- Wikipedia:Database reports/Templates transcluded on the most pages – Lists the 1000 most transcluded templates. Not updated since November 2018.
- Special:MostLinkedTemplates – Currently disabled for the English Wikipedia, but still runs for other Wikipedias so might be turned on again some day.
- tools:~dispenser/cgi-bin/embeddedincount.py – Seems to lack human interface, probably meant for programs to call.
- Special:PrefixIndex/Module:Transclusion_count/data/ Template count data used by this template. Broken down by first letter of template and rounded to two or three significant figures. Updated weekly.
Rounding and + notation
{{high-use| 49,500 | demo=A template that does not exist }} {{high-use| 49,500+ | demo=A template that does not exist }}
This is the {{High-use}} message box.
It is meant to be put at the top of the documentation for templates used on more than 2000 pages.
For templates where the number of pages is more than 100,000 or if the first parameter is set as "risk" a stronger wording is given.
Note! It is normal that some of the links in the message box are red.
Usage
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
The template can be used as is, and will automatically use bot-updated transclusion counts from subpages of Module:Transclusion_count/data/ when available. But it can also take some parameters:
number of transclusions
: The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored if transclusion data is available for the current page (generally for templates with more than 2000 transclusions).discussion page, or use + notation
: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example,2=WP:VPT
will insert a link to WP:VPT),all-pages=yes
: Will also output what percentage of all pages use the template. This should only be used for very highly transcluded templates.info=extra information
: When set to non-blank, will insert extra information into the template text if the template has more than 10,000 transclusions or paramter 1 is set to "risk".demo=Template_name
: Will use the transclusion count for the template at Template:Template_name instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.form=
: When set to "editnotice", will display the message using {{editnotice}} instead of {{ombox}}.expiry=
: Sets the|expiry=
paramter for {{editnotice}}.
Examples
The full code for a /doc page top can look like this:
{{documentation subpage}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Standard form
{{high-use| 4,000 }} {{high-use| 4,000 | Wikipedia talk:High-risk templates }} {{high-use| | Wikipedia talk:High-risk templates }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Rounding and + notation
{{high-use| 49,500 | demo=A template that does not exist }} {{high-use| 49,500+ | demo=A template that does not exist }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Editnotice form
{{high-use| form=editnotice }}
检查到模板循环:模板:High-use
High risk
{{high-use| demo=Yesno }} {{high-use| risk }} {{high-use| risk | Wikipedia talk:High-risk templates | all-pages = yes | info = This is a very large number! }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Technical details
The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
Ahechtbot compiles usage statistics for all templates with 2,000 or more transclusions using User:Ahechtbot/transclusioncount.py, and writes them to subpages of Module:Transclusion count/data (see Wikipedia:Bots/Requests for approval/Ahechtbot 6). These pages are usually updated every Sunday, but since running the query is resource intensive, it may be delayed or skipped if Wikipedia server usage is high. If a transclusion count is available in Module:Transclusion count/data, any manually input values will be ignored by this template.
Supporting templates and modules
See also
- {{Used in system}} – For templates used in the Wikipedia user interface.
- {{Intricate template}}
- {{pp-template}} – The protection template that usually is put on high-risk templates.
- Wikipedia:Template sandbox and test cases
- Wikipedia:High-risk templates
Template counters
- toollabs:templatecount/ – Easy to use, returns current (real time) transclusion count for a template.
- Wikipedia:Database reports/Templates transcluded on the most pages – Lists the 1000 most transcluded templates. Not updated since November 2018.
- Special:MostLinkedTemplates – Currently disabled for the English Wikipedia, but still runs for other Wikipedias so might be turned on again some day.
- tools:~dispenser/cgi-bin/embeddedincount.py – Seems to lack human interface, probably meant for programs to call.
- Special:PrefixIndex/Module:Transclusion_count/data/ Template count data used by this template. Broken down by first letter of template and rounded to two or three significant figures. Updated weekly.
This is the {{High-use}} message box.
It is meant to be put at the top of the documentation for templates used on more than 2000 pages.
For templates where the number of pages is more than 100,000 or if the first parameter is set as "risk" a stronger wording is given.
Note! It is normal that some of the links in the message box are red.
Usage
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
The template can be used as is, and will automatically use bot-updated transclusion counts from subpages of Module:Transclusion_count/data/ when available. But it can also take some parameters:
number of transclusions
: The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored if transclusion data is available for the current page (generally for templates with more than 2000 transclusions).discussion page, or use + notation
: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example,2=WP:VPT
will insert a link to WP:VPT),all-pages=yes
: Will also output what percentage of all pages use the template. This should only be used for very highly transcluded templates.info=extra information
: When set to non-blank, will insert extra information into the template text if the template has more than 10,000 transclusions or paramter 1 is set to "risk".demo=Template_name
: Will use the transclusion count for the template at Template:Template_name instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.form=
: When set to "editnotice", will display the message using {{editnotice}} instead of {{ombox}}.expiry=
: Sets the|expiry=
paramter for {{editnotice}}.
Examples
The full code for a /doc page top can look like this:
{{documentation subpage}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Standard form
{{high-use| 4,000 }} {{high-use| 4,000 | Wikipedia talk:High-risk templates }} {{high-use| | Wikipedia talk:High-risk templates }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Rounding and + notation
{{high-use| 49,500 | demo=A template that does not exist }} {{high-use| 49,500+ | demo=A template that does not exist }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Editnotice form
{{high-use| form=editnotice }}
检查到模板循环:模板:High-use
High risk
{{high-use| demo=Yesno }} {{high-use| risk }} {{high-use| risk | Wikipedia talk:High-risk templates | all-pages = yes | info = This is a very large number! }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Technical details
The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
Ahechtbot compiles usage statistics for all templates with 2,000 or more transclusions using User:Ahechtbot/transclusioncount.py, and writes them to subpages of Module:Transclusion count/data (see Wikipedia:Bots/Requests for approval/Ahechtbot 6). These pages are usually updated every Sunday, but since running the query is resource intensive, it may be delayed or skipped if Wikipedia server usage is high. If a transclusion count is available in Module:Transclusion count/data, any manually input values will be ignored by this template.
Supporting templates and modules
See also
- {{Used in system}} – For templates used in the Wikipedia user interface.
- {{Intricate template}}
- {{pp-template}} – The protection template that usually is put on high-risk templates.
- Wikipedia:Template sandbox and test cases
- Wikipedia:High-risk templates
Template counters
- toollabs:templatecount/ – Easy to use, returns current (real time) transclusion count for a template.
- Wikipedia:Database reports/Templates transcluded on the most pages – Lists the 1000 most transcluded templates. Not updated since November 2018.
- Special:MostLinkedTemplates – Currently disabled for the English Wikipedia, but still runs for other Wikipedias so might be turned on again some day.
- tools:~dispenser/cgi-bin/embeddedincount.py – Seems to lack human interface, probably meant for programs to call.
- Special:PrefixIndex/Module:Transclusion_count/data/ Template count data used by this template. Broken down by first letter of template and rounded to two or three significant figures. Updated weekly.
Editnotice form
{{high-use| form=editnotice }}
This is the {{High-use}} message box.
It is meant to be put at the top of the documentation for templates used on more than 2000 pages.
For templates where the number of pages is more than 100,000 or if the first parameter is set as "risk" a stronger wording is given.
Note! It is normal that some of the links in the message box are red.
Usage
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
The template can be used as is, and will automatically use bot-updated transclusion counts from subpages of Module:Transclusion_count/data/ when available. But it can also take some parameters:
number of transclusions
: The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored if transclusion data is available for the current page (generally for templates with more than 2000 transclusions).discussion page, or use + notation
: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example,2=WP:VPT
will insert a link to WP:VPT),all-pages=yes
: Will also output what percentage of all pages use the template. This should only be used for very highly transcluded templates.info=extra information
: When set to non-blank, will insert extra information into the template text if the template has more than 10,000 transclusions or paramter 1 is set to "risk".demo=Template_name
: Will use the transclusion count for the template at Template:Template_name instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.form=
: When set to "editnotice", will display the message using {{editnotice}} instead of {{ombox}}.expiry=
: Sets the|expiry=
paramter for {{editnotice}}.
Examples
The full code for a /doc page top can look like this:
{{documentation subpage}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Standard form
{{high-use| 4,000 }} {{high-use| 4,000 | Wikipedia talk:High-risk templates }} {{high-use| | Wikipedia talk:High-risk templates }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Rounding and + notation
{{high-use| 49,500 | demo=A template that does not exist }} {{high-use| 49,500+ | demo=A template that does not exist }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Editnotice form
{{high-use| form=editnotice }}
检查到模板循环:模板:High-use
High risk
{{high-use| demo=Yesno }} {{high-use| risk }} {{high-use| risk | Wikipedia talk:High-risk templates | all-pages = yes | info = This is a very large number! }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Technical details
The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
Ahechtbot compiles usage statistics for all templates with 2,000 or more transclusions using User:Ahechtbot/transclusioncount.py, and writes them to subpages of Module:Transclusion count/data (see Wikipedia:Bots/Requests for approval/Ahechtbot 6). These pages are usually updated every Sunday, but since running the query is resource intensive, it may be delayed or skipped if Wikipedia server usage is high. If a transclusion count is available in Module:Transclusion count/data, any manually input values will be ignored by this template.
Supporting templates and modules
See also
- {{Used in system}} – For templates used in the Wikipedia user interface.
- {{Intricate template}}
- {{pp-template}} – The protection template that usually is put on high-risk templates.
- Wikipedia:Template sandbox and test cases
- Wikipedia:High-risk templates
Template counters
- toollabs:templatecount/ – Easy to use, returns current (real time) transclusion count for a template.
- Wikipedia:Database reports/Templates transcluded on the most pages – Lists the 1000 most transcluded templates. Not updated since November 2018.
- Special:MostLinkedTemplates – Currently disabled for the English Wikipedia, but still runs for other Wikipedias so might be turned on again some day.
- tools:~dispenser/cgi-bin/embeddedincount.py – Seems to lack human interface, probably meant for programs to call.
- Special:PrefixIndex/Module:Transclusion_count/data/ Template count data used by this template. Broken down by first letter of template and rounded to two or three significant figures. Updated weekly.
High risk
{{high-use| demo=Yesno }} {{high-use| risk }} {{high-use| risk | Wikipedia talk:High-risk templates | all-pages = yes | info = This is a very large number! }}
This is the {{High-use}} message box.
It is meant to be put at the top of the documentation for templates used on more than 2000 pages.
For templates where the number of pages is more than 100,000 or if the first parameter is set as "risk" a stronger wording is given.
Note! It is normal that some of the links in the message box are red.
Usage
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
The template can be used as is, and will automatically use bot-updated transclusion counts from subpages of Module:Transclusion_count/data/ when available. But it can also take some parameters:
number of transclusions
: The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored if transclusion data is available for the current page (generally for templates with more than 2000 transclusions).discussion page, or use + notation
: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example,2=WP:VPT
will insert a link to WP:VPT),all-pages=yes
: Will also output what percentage of all pages use the template. This should only be used for very highly transcluded templates.info=extra information
: When set to non-blank, will insert extra information into the template text if the template has more than 10,000 transclusions or paramter 1 is set to "risk".demo=Template_name
: Will use the transclusion count for the template at Template:Template_name instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.form=
: When set to "editnotice", will display the message using {{editnotice}} instead of {{ombox}}.expiry=
: Sets the|expiry=
paramter for {{editnotice}}.
Examples
The full code for a /doc page top can look like this:
{{documentation subpage}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Standard form
{{high-use| 4,000 }} {{high-use| 4,000 | Wikipedia talk:High-risk templates }} {{high-use| | Wikipedia talk:High-risk templates }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Rounding and + notation
{{high-use| 49,500 | demo=A template that does not exist }} {{high-use| 49,500+ | demo=A template that does not exist }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Editnotice form
{{high-use| form=editnotice }}
检查到模板循环:模板:High-use
High risk
{{high-use| demo=Yesno }} {{high-use| risk }} {{high-use| risk | Wikipedia talk:High-risk templates | all-pages = yes | info = This is a very large number! }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Technical details
The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
Ahechtbot compiles usage statistics for all templates with 2,000 or more transclusions using User:Ahechtbot/transclusioncount.py, and writes them to subpages of Module:Transclusion count/data (see Wikipedia:Bots/Requests for approval/Ahechtbot 6). These pages are usually updated every Sunday, but since running the query is resource intensive, it may be delayed or skipped if Wikipedia server usage is high. If a transclusion count is available in Module:Transclusion count/data, any manually input values will be ignored by this template.
Supporting templates and modules
See also
- {{Used in system}} – For templates used in the Wikipedia user interface.
- {{Intricate template}}
- {{pp-template}} – The protection template that usually is put on high-risk templates.
- Wikipedia:Template sandbox and test cases
- Wikipedia:High-risk templates
Template counters
- toollabs:templatecount/ – Easy to use, returns current (real time) transclusion count for a template.
- Wikipedia:Database reports/Templates transcluded on the most pages – Lists the 1000 most transcluded templates. Not updated since November 2018.
- Special:MostLinkedTemplates – Currently disabled for the English Wikipedia, but still runs for other Wikipedias so might be turned on again some day.
- tools:~dispenser/cgi-bin/embeddedincount.py – Seems to lack human interface, probably meant for programs to call.
- Special:PrefixIndex/Module:Transclusion_count/data/ Template count data used by this template. Broken down by first letter of template and rounded to two or three significant figures. Updated weekly.
This is the {{High-use}} message box.
It is meant to be put at the top of the documentation for templates used on more than 2000 pages.
For templates where the number of pages is more than 100,000 or if the first parameter is set as "risk" a stronger wording is given.
Note! It is normal that some of the links in the message box are red.
Usage
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
The template can be used as is, and will automatically use bot-updated transclusion counts from subpages of Module:Transclusion_count/data/ when available. But it can also take some parameters:
number of transclusions
: The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored if transclusion data is available for the current page (generally for templates with more than 2000 transclusions).discussion page, or use + notation
: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example,2=WP:VPT
will insert a link to WP:VPT),all-pages=yes
: Will also output what percentage of all pages use the template. This should only be used for very highly transcluded templates.info=extra information
: When set to non-blank, will insert extra information into the template text if the template has more than 10,000 transclusions or paramter 1 is set to "risk".demo=Template_name
: Will use the transclusion count for the template at Template:Template_name instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.form=
: When set to "editnotice", will display the message using {{editnotice}} instead of {{ombox}}.expiry=
: Sets the|expiry=
paramter for {{editnotice}}.
Examples
The full code for a /doc page top can look like this:
{{documentation subpage}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Standard form
{{high-use| 4,000 }} {{high-use| 4,000 | Wikipedia talk:High-risk templates }} {{high-use| | Wikipedia talk:High-risk templates }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Rounding and + notation
{{high-use| 49,500 | demo=A template that does not exist }} {{high-use| 49,500+ | demo=A template that does not exist }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Editnotice form
{{high-use| form=editnotice }}
检查到模板循环:模板:High-use
High risk
{{high-use| demo=Yesno }} {{high-use| risk }} {{high-use| risk | Wikipedia talk:High-risk templates | all-pages = yes | info = This is a very large number! }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Technical details
The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
Ahechtbot compiles usage statistics for all templates with 2,000 or more transclusions using User:Ahechtbot/transclusioncount.py, and writes them to subpages of Module:Transclusion count/data (see Wikipedia:Bots/Requests for approval/Ahechtbot 6). These pages are usually updated every Sunday, but since running the query is resource intensive, it may be delayed or skipped if Wikipedia server usage is high. If a transclusion count is available in Module:Transclusion count/data, any manually input values will be ignored by this template.
Supporting templates and modules
See also
- {{Used in system}} – For templates used in the Wikipedia user interface.
- {{Intricate template}}
- {{pp-template}} – The protection template that usually is put on high-risk templates.
- Wikipedia:Template sandbox and test cases
- Wikipedia:High-risk templates
Template counters
- toollabs:templatecount/ – Easy to use, returns current (real time) transclusion count for a template.
- Wikipedia:Database reports/Templates transcluded on the most pages – Lists the 1000 most transcluded templates. Not updated since November 2018.
- Special:MostLinkedTemplates – Currently disabled for the English Wikipedia, but still runs for other Wikipedias so might be turned on again some day.
- tools:~dispenser/cgi-bin/embeddedincount.py – Seems to lack human interface, probably meant for programs to call.
- Special:PrefixIndex/Module:Transclusion_count/data/ Template count data used by this template. Broken down by first letter of template and rounded to two or three significant figures. Updated weekly.
This is the {{High-use}} message box.
It is meant to be put at the top of the documentation for templates used on more than 2000 pages.
For templates where the number of pages is more than 100,000 or if the first parameter is set as "risk" a stronger wording is given.
Note! It is normal that some of the links in the message box are red.
Usage
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
This template is used to show example template usage without expanding the template itself.
Basic use
(Note: In the following examples, ellipses (groups of three dots) indicate where parameters have been omitted.)
- {{tlx模板:\sandbox|tlx|Template|first parameter|second parameter|third parameter|...|tenth parameter}} produces: {{tlx模板:\sandbox|Template|first parameter|second parameter|third parameter|...|tenth parameter}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use 模板:Tlf, like so:
- {{tlx模板:\sandbox|tlx|Template|first{{=}}first value|second|third{{=}}third value}} produces: {{tlx模板:\sandbox|Template|first=first value|second|third=third value}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki>...</nowiki>
tags. When you do, you don't need to replace equals-signs. For instance:
- {{tlx模板:\sandbox|tlx|Template|<nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki>}} produces: {{tlx模板:\sandbox|Template|first|second|third=value|...|999th}}
Purpose and naming
Mnemonically, template link expanded (after template link).
This template allows an example of calling a template, accompanied by one or more parameters, to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in |
. A keyword parameter can be used with equals code = or {{=}} or in nowiki-text: "<nowiki>size=10</nowiki>
" or all parameters as a string in "<nowiki>
" tags; see Examples at bottom. For more details, see this talk page. If you use 21 or more parameters, all after the 20th will be replaced with a single |...
at the end of the parameter list.
- Exceptions
If the intended template lists numerous parameters, then perhaps this template should really 模板:Em be used, and just hardcode the usage with <code>
<nowiki>
. For example:
<code>
.<nowiki>{{Anytemplate|arg1=23|size=250px|other parameters...}}</nowiki>
</code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>
.
Parameters
- If the only parameter supplied is 模板:Param, i.e. a template's name, 检查到模板循环:模板:Tlx's output is the same as 检查到模板循环:模板:Tlx – i.e. a link within braces – but in a monospaced font:
- 模板:Tc produces: {{tl}}
- 模板:Tc produces: {{tlx模板:\sandbox|tl}}
- 检查到模板循环:模板:Tlx will also not take nor display additional parameters.
- Named parameters
|subst=
- Setting this parameter to any non-blank value will prefix the string
subst:
linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example, {{tlx模板:\sandbox|tlx|Welcome|3=subst=Y}} produces: {{tlx模板:\sandbox|Welcome|subst=Y}}. This is similar to the action of the {{tlx模板:\sandbox|tlxs}} template: {{tlx模板:\sandbox|tlxs|Welcome}} produces: 模板:Tlxs.
|SISTER=
- For an interwiki link to other sister projects, such as:
|SISTER=M:
(Meta),|SISTER=Q:
(WikiQuote),|SISTER=S:
(WikiSource), etc, facilitating interwiki template documentation and/or discussion.
|LANG=
- For a link to Wikipedias in other languages, such as:
|LANG=de:
(German),|LANG=sv:
(Swedish), etc, facilitating cross-language template documentation and/or discussion.
Documentation
{{Tlx}} is a generalization of {{tl|x}}, {{tlp|x}} etc., with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "模板:Thin space{模板:Thin space", "模板:Thin space|模板:Thin space", "模板:Thin space}模板:Thin space" and links can be hard to read when not monospaced (and hard to click on; for uses like {{!}}
, see {{tlw}}, which makes the click target bigger).
Usage
{{tlx|Templatename}}
{{tlx|Templatename|param}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10}}
{{tlx|Templatename|1|2|3|4|5|6|7|8|9|10|more}}
{{tlx|Templatename|param=value}}
There are up to 10 placeholders for parameters of the specified template.
Examples
- Note
- At the en.wikipedia and Meta sites, X0, X1, X2, ... X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other sister projects.
- Unlimited parameters as one
<nowiki>...</nowiki>
string - {{tlx模板:\sandbox|tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
TemplateData
High-use-{zh-cn:模板数据;zh-tw:模板資料}-
<templatedata> { "params": { "1": { "label": "Template name", "description": "Name of the template to link.", "example": "Tlx", "type": "wiki-template-name", "required": true }, "2": { "label": "1st parameter", "type": "string" }, "3": { "label": "2nd parameter", "type": "string" }, "4": { "label": "3rd parameter", "type": "string" }, "5": { "label": "4th parameter", "type": "string" }, "6": { "label": "5th parameter", "type": "string" }, "7": { "label": "6th parameter", "type": "string" }, "8": { "label": "7th parameter", "type": "string" }, "9": { "label": "8th parameter", "type": "string" }, "10": { "label": "9th parameter", "type": "string" }, "11": { "label": "10th parameter", "type": "string" }, "12": { "label": "11th parameter", "type": "string" }, "13": { "label": "12th parameter", "type": "string" }, "14": { "label": "13th parameter", "type": "string" }, "15": { "label": "14th parameter", "type": "string" }, "16": { "label": "15th parameter", "type": "string" }, "17": { "label": "16th parameter", "type": "string" }, "18": { "label": "17th parameter", "type": "string" }, "19": { "label": "18th parameter", "type": "string" }, "20": { "label": "19th parameter", "type": "string" }, "21": { "label": "20th parameter", "type": "string" }, "subst": { "description": "Set to any value to show \"subst:\" before the template name", "example": "true", "type": "boolean", "label": "Show subst:" }, "LANG": { "label": "Language", "description": "The prefix for a link to Wikipedias in other languages.", "example": "de:", "type": "line" }, "SISTER": { "description": "The prefix for an interwiki link to other sister projects", "example": "M:", "type": "line", "label": "Sister project" } }, "description": "Show example template usage without expanding the template itself. 模板:Tnull is similar without linking the template.", "paramOrder": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "subst", "LANG", "SISTER" ], "format": "inline" } </templatedata> 模板:Collapse bottom
See also
- {{tlxb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{tlb}}, a version of 模板:Tlf where the template name is shown in bold.
- {{temt}}, a version of 模板:Tlf that handles templates whose names include "Template:" and pages outside the Template: namespace that are treated as templates.
- {{para}}, for the presentation of template parameters and values (e.g.
|paraname=val
,|another=
). - {{tnull}}, like 模板:Tnull without linking the template.
模板:Template-linking templates 模板:Sandbox other
The template can be used as is, and will automatically use bot-updated transclusion counts from subpages of Module:Transclusion_count/data/ when available. But it can also take some parameters:
number of transclusions
: The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored if transclusion data is available for the current page (generally for templates with more than 2000 transclusions).discussion page, or use + notation
: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example,2=WP:VPT
will insert a link to WP:VPT),all-pages=yes
: Will also output what percentage of all pages use the template. This should only be used for very highly transcluded templates.info=extra information
: When set to non-blank, will insert extra information into the template text if the template has more than 10,000 transclusions or paramter 1 is set to "risk".demo=Template_name
: Will use the transclusion count for the template at Template:Template_name instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.form=
: When set to "editnotice", will display the message using {{editnotice}} instead of {{ombox}}.expiry=
: Sets the|expiry=
paramter for {{editnotice}}.
Examples
The full code for a /doc page top can look like this:
{{documentation subpage}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Standard form
{{high-use| 4,000 }} {{high-use| 4,000 | Wikipedia talk:High-risk templates }} {{high-use| | Wikipedia talk:High-risk templates }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Rounding and + notation
{{high-use| 49,500 | demo=A template that does not exist }} {{high-use| 49,500+ | demo=A template that does not exist }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Editnotice form
{{high-use| form=editnotice }}
检查到模板循环:模板:High-use
High risk
{{high-use| demo=Yesno }} {{high-use| risk }} {{high-use| risk | Wikipedia talk:High-risk templates | all-pages = yes | info = This is a very large number! }}
检查到模板循环:模板:High-use 检查到模板循环:模板:High-use 检查到模板循环:模板:High-use
Technical details
The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
Ahechtbot compiles usage statistics for all templates with 2,000 or more transclusions using User:Ahechtbot/transclusioncount.py, and writes them to subpages of Module:Transclusion count/data (see Wikipedia:Bots/Requests for approval/Ahechtbot 6). These pages are usually updated every Sunday, but since running the query is resource intensive, it may be delayed or skipped if Wikipedia server usage is high. If a transclusion count is available in Module:Transclusion count/data, any manually input values will be ignored by this template.
Supporting templates and modules
See also
- {{Used in system}} – For templates used in the Wikipedia user interface.
- {{Intricate template}}
- {{pp-template}} – The protection template that usually is put on high-risk templates.
- Wikipedia:Template sandbox and test cases
- Wikipedia:High-risk templates
Template counters
- toollabs:templatecount/ – Easy to use, returns current (real time) transclusion count for a template.
- Wikipedia:Database reports/Templates transcluded on the most pages – Lists the 1000 most transcluded templates. Not updated since November 2018.
- Special:MostLinkedTemplates – Currently disabled for the English Wikipedia, but still runs for other Wikipedias so might be turned on again some day.
- tools:~dispenser/cgi-bin/embeddedincount.py – Seems to lack human interface, probably meant for programs to call.
- Special:PrefixIndex/Module:Transclusion_count/data/ Template count data used by this template. Broken down by first letter of template and rounded to two or three significant figures. Updated weekly.
Technical details
The /sandbox and /testcases links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
Ahechtbot compiles usage statistics for all templates with 2,000 or more transclusions using User:Ahechtbot/transclusioncount.py, and writes them to subpages of Module:Transclusion count/data (see Wikipedia:Bots/Requests for approval/Ahechtbot 6). These pages are usually updated every Sunday, but since running the query is resource intensive, it may be delayed or skipped if Wikipedia server usage is high. If a transclusion count is available in Module:Transclusion count/data, any manually input values will be ignored by this template.
Supporting templates and modules
See also
- {{Used in system}} – For templates used in the Wikipedia user interface.
- {{Intricate template}}
- {{pp-template}} – The protection template that usually is put on high-risk templates.
- Wikipedia:Template sandbox and test cases
- Wikipedia:High-risk templates
Template counters
- toollabs:templatecount/ – Easy to use, returns current (real time) transclusion count for a template.
- Wikipedia:Database reports/Templates transcluded on the most pages – Lists the 1000 most transcluded templates. Not updated since November 2018.
- Special:MostLinkedTemplates – Currently disabled for the English Wikipedia, but still runs for other Wikipedias so might be turned on again some day.
- tools:~dispenser/cgi-bin/embeddedincount.py – Seems to lack human interface, probably meant for programs to call.
- Special:PrefixIndex/Module:Transclusion_count/data/ Template count data used by this template. Broken down by first letter of template and rounded to two or three significant figures. Updated weekly.