Template:Txl/doc: Difference between revisions

[checked revision][checked revision]
Content deleted Content added
Created page with "<includeonly>{{small |1=Note: This documentation for {{tlx|tlx}} is also transcluded by its derivatives {{tlx|tlxb}}, {{tlx|tlxc}} (<sp..."
 
No edit summary
Line 1:
<includeonly>{{small |1=Note: This documentation for {{tlx|tlx}} is also [[Wikipedia:Template doc page pattern|transcluded]] by its derivatives {{tlx|tlxb}}, {{tlx|tlxc}} (<span class="plainlinks">[{{fullurl:Template:Tlx/doc |action=edit}} edit]</span>{{#ifeq:{{SITENAME}}|Meta |). |{{dot}}[[MMediawikiwiki:template:{{PAGENAMEE}}|master page]]).}}<!--(end small:)-->}}</includeonly><noinclude>{{Documentation subpage}}{{clear}}</noinclude>
{{#ifeq:{{BASEPAGENAME}}|Tlx |{{High-risk|2325910+}} {{Used in system}} }}
 
Line 5:
 
==Basic use==
''(Note: In the following examples, [[Wikipedia:Ellipsis|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''}}
Line 18:
Mnemonically, ''template link expanded'' (after ''[[Template:tl|template link]]'').
 
This template allows an example of calling a template, accompanied by one or more parameters<!-- ("pass parameters", i.e. [[Wikipedia:Help:Pipe trick|pipe-tricked]] [[mmediawikiwiki:Parameter#Parameters|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 <code>&amp;#124;</code>. A keyword parameter can be used with equals code &amp;#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. If you use 21 or more parameters, all after the 20th will be replaced with a single {{para||...}} at the end of the parameter list.
Line 28:
 
===Parameters===
*If the only parameter supplied is {{param|1}}, i.e. a template's name, {{tlx|tlx}}'s output is the same as {{tlx|tl}}&nbsp;&ndash; i.e. a link within [[Braces (punctuation)|braces]]&nbsp;&ndash; but in a [[Wikipedia:monospaced font|monospaced font]]:
**{{tc|tl|tl}} produces: {{tl|tl}}
**{{tc|tlx|tl}} produces: {{tlx{{\sandbox}}|tl}}
: {{tlx|tl}} will also not take nor display additional parameters.
 
; Named parameters
{{para|subst}}
: Setting this parameter to any non-blank value will prefix the string <code>subst:</code> 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|Welcome}}.
{{para|SISTER}}
: For an interwiki link to [[H:IW|other sister projects]], such as: {{para|SISTER|M:}} ([[m:|Meta]]), {{para|SISTER|Q:}} ([[q:|WikiQuote]]), {{para|SISTER|S:}} ([[s:|WikiSource]]), etc, facilitating interwiki template documentation and/or discussion.
{{para|LANG}}
: For a link to [[H:ILL|Wikipedias in other languages]], such as: {{para|LANG|de:}} ([[:de:|German]]), {{para|LANG|sv:}} ([[:sv:|Swedish]]), etc, facilitating cross-language template documentation and/or discussion.
 
==Documentation==
{{tl|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 "{{thin space}}'''{'''{{thin space}}", "{{thin space}}'''&#124;'''{{thin space}}", "{{thin space}}'''}'''{{thin space}}" and links can be hard to read when not monospaced (and hard to click on; for uses like <code><nowiki>{{!}}</nowiki></code>, see {{tl|tlw}}, which makes the click target bigger).
 
For documentation see wikipedia page [[wikipedia:Template:Txl]]
 
 
===Usage===