Editing Template:Tlx/doc
From MINR.ORG WIKI
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | <includeonly>{{small |1=Note: This documentation for {{tlx|tlx}} is also [[w:Wikipedia:Template doc page pattern|transcluded]] by its derivatives {{tlx|tlxb}}, {{tlx|tlxc}}, {{tlx|tlxw}} (<span class="plainlinks">[{{fullurl:Template:Tlx/doc |action=edit}} edit]</span>{{#ifeq:{{SITENAME}}|Meta |). |{{dot}}[[M:template:{{PAGENAMEE}}|master page]]).}}<!--(end small:)-->}}</includeonly><!-- | + | <includeonly>{{small |1=Note: This documentation for {{tlx|tlx}} is also [[w:Wikipedia:Template doc page pattern|transcluded]] by its derivatives {{tlx|tlxb}}, {{tlx|tlxc}}, {{tlx|tlxw}}, {{tlx|tlxU}} (<span class="plainlinks">[{{fullurl:Template:Tlx/doc |action=edit}} edit]</span>{{#ifeq:{{SITENAME}}|Meta |). |{{dot}}[[M:template:{{PAGENAMEE}}|master page]]).}}<!--(end small:)-->}}</includeonly><!-- |
--><noinclude>{{Documentation subpage}}{{clear}}</noinclude> | --><noinclude>{{Documentation subpage}}{{clear}}</noinclude> | ||
− | {{#ifeq:{{BASEPAGENAME}}|Tlx |{{High- | + | {{#ifeq:{{BASEPAGENAME}}|Tlx |{{High-use|980,000+}} }} |
− | |||
== Basic use == | == Basic use == | ||
''(Note: In the following examples, [[Ellipsis|ellipses (groups of three dots)]] indicate where parameters have been omitted.)'' | ''(Note: In the following examples, [[Ellipsis|ellipses (groups of three dots)]] indicate where parameters have been omitted.)'' | ||
− | : {{tlx{{\sandbox}}|tlx|Template|''first parameter''|''second parameter''|''third''| | + | : {{tlx{{\sandbox}}|tlx|Template|''first parameter''|''second parameter''|''third''|…|''tenth''}} produces: {{tlx{{\sandbox}}|Template|''first parameter''|''second parameter''|''third''|…|''tenth''}} |
− | Where parameters might contain one or more equals-signs ("="), replace each equals-sign with {{ | + | Where parameters might contain one or more equals-signs ("="), replace each equals-sign with {{tcpl|{{=}}}}: |
: {{tlx{{\sandbox}}|tlx|Template|''first''<nowiki>{{=}}</nowiki>''something''|''second''|''third''<nowiki>{{=}}</nowiki>''something''|...|tenth}} produces: {{tlx{{\sandbox}}|Template|''first{{=}}something''|''second''|''third{{=}}something''|...|''tenth''}} | : {{tlx{{\sandbox}}|tlx|Template|''first''<nowiki>{{=}}</nowiki>''something''|''second''|''third''<nowiki>{{=}}</nowiki>''something''|...|tenth}} produces: {{tlx{{\sandbox}}|Template|''first{{=}}something''|''second''|''third{{=}}something''|...|''tenth''}} | ||
Line 18: | Line 17: | ||
== Purpose and naming == | == Purpose and naming == | ||
− | [[Wikt:mnemonic|Mnemonically]], "['''t''']emplate ['''l''']ink e['''x''']panded" (after {{ | + | [[Wikt:mnemonic|Mnemonically]], "[{{padlr|'''t'''}}]emplate [{{padlr|'''l'''}}]ink e['''x''']panded" (after {{tlpad|tl}}, "[{{padlr|'''t'''}}]emplate [{{padlr|'''l'''}}]ink"). |
This template allows an example of calling a template, accompanied by one or more parameters<!-- ("pass parameters", i.e. [[Help:Pipe trick|pipe-tricked]] [[m:Parameter#Parameters|parameters]])-->, to be displayed without also causing the template to be called. | This template allows an example of calling a template, accompanied by one or more parameters<!-- ("pass parameters", i.e. [[Help:Pipe trick|pipe-tricked]] [[m:Parameter#Parameters|parameters]])-->, to be displayed without also causing the template to be called. | ||
− | Up to ten of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 10 parameters can be displayed using a coded vertical-bar (as in "{{small|&#124;}} | + | Up to ten of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 10 parameters can be displayed using a coded vertical-bar (as in "{{small|&#124;}}…"). A keyword parameter can be used with equals code &#61; or <nowiki>{{=}}</nowiki> or in nowiki-text: "{{tag|nowiki|content=size=10}}" or all parameters as a string in "{{tag|nowiki|o}}" tags; see ''[[#Examples|Examples]]'' at bottom. For more details, see [[{{TALKPAGENAME}}|this talk]] page. |
; Exceptions | ; Exceptions | ||
Line 30: | Line 29: | ||
===Parameters=== | ===Parameters=== | ||
− | * If the only parameter supplied is {{param|1}}, i.e. a template's name, {{ | + | * If the only parameter supplied is {{param|1}}, i.e. a template's name, {{tpad|tlx}}'s output is the same as {{tlpad|tl}}{{aside|i.e. a link within [[Braces (punctuation)|braces]]}} but in a [[monospaced font]]: |
** {{tc|tl|tl}} produces: {{tl|tl}} | ** {{tc|tl|tl}} produces: {{tl|tl}} | ||
** {{tc|tlx|tl}} produces: {{tlx{{\sandbox}}|tl}} | ** {{tc|tlx|tl}} produces: {{tlx{{\sandbox}}|tl}} | ||
− | : {{ | + | : {{tpad|tl}} will also not take nor display additional parameters. |
; Named parameters | ; Named parameters | ||
Line 45: | Line 44: | ||
== Documentation == | == Documentation == | ||
− | {{ | + | {{tlpad|Tlx}} is a generalization of {{tl|tl|x}}, {{tl|tlp|x|y}} etc, with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "{{thinsp|'''{'''}}", "{{thinsp|'''|'''}}", "{{thinsp|'''}'''}}" and links can be hard to read when not monospaced (and hard to click on; for uses like <code><nowiki>{{!}}</nowiki></code>, see {{tlpad|tlw}}, which makes the click target bigger). |
===Usage=== | ===Usage=== | ||
Line 89: | Line 88: | ||
| {{tlx|tlx|x2|<nowiki>2=</nowiki>|<nowiki>3=two</nowiki>}} | {{tlx{{\sandbox}}|x2|2=|3=two}} | empty really doesn't work | | {{tlx|tlx|x2|<nowiki>2=</nowiki>|<nowiki>3=two</nowiki>}} | {{tlx{{\sandbox}}|x2|2=|3=two}} | empty really doesn't work | ||
− | | {{tlx|tlx|x2|<nowiki>2=one</nowiki>|two}} | {{tlx{{\sandbox}}|x2|two}} | "two" overrides "2{{=}}one" | + | | {{tlx|tlx|x2|<nowiki>2=one</nowiki>|two}} | {{tlx{{\sandbox}}|x2|2=one|two}} | "two" overrides "2{{=}}one" |
| {{tlx|tlx|x2|<nowiki>3=two</nowiki>|<nowiki>2=one</nowiki>}} | {{tlx{{\sandbox}}|x2|3=two|2=one}} | {{align|right|irregular parameter order is okay}} | | {{tlx|tlx|x2|<nowiki>3=two</nowiki>|<nowiki>2=one</nowiki>}} | {{tlx{{\sandbox}}|x2|3=two|2=one}} | {{align|right|irregular parameter order is okay}} | ||
Line 97: | Line 96: | ||
== See also == | == See also == | ||
− | * {{ | + | * {{tlpad|tlxb}}, a version of {{tpad|tlx}} where the template name is shown in bold. |
− | *: {{ | + | *: {{tlpad|tlb}}, a version of {{tpad|tl}} where the template name is shown in bold. |
− | * {{ | + | * {{tlpad|temt}}, a version of {{tpad|tlx}} that handles templates whose names include "Template:" and pages outside the Template: [[Wikipedia:Namespace|namespace]] that are treated as templates. |
− | * {{tl|para}}, for the presentation of template parameters and values (e.g. {{para|paraname|val}}, {{para|another}}). | + | * {{tl|para}}, for the presentation of template parameters and values (e.g. {{para|paraname|val}}, {{para|another}}, etc). |
== Template-linking templates == | == Template-linking templates == | ||
Line 110: | Line 109: | ||
[[Category:Typing-aid templates]] | [[Category:Typing-aid templates]] | ||
+ | <!-- ?: [[de:Vorlage:Vorlage]] --> | ||
}} }}</includeonly> | }} }}</includeonly> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |