Template:Tlx/doc

From wiki.jriver.com
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

(In the following examples, three dots indicate where parameters have been omitted.)

Basic Use

{{{{#if:|subst:}}tlx{{#if:Template|

|Template }}{{#if:first parameter| |first parameter }}{{#if:second parameter| |second parameter }}{{#if:third| |third }}{{#if:...| |... }}{{#if:tenth| |tenth }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}{{{{#if:|subst:}}Template{{#if:first parameter| |first parameter }}{{#if:second parameter| |second parameter }}{{#if:third| |third }}{{#if:...| |... }}{{#if:tenth| |tenth }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} Where parameters might contain one or more equals-signs ("="), replace each equals-sign with {{{{#if:|subst:}}={{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}:

{{{{#if:|subst:}}tlx{{#if:Template|

|Template }}{{#if:first{{=}}something| |first{{=}}something }}{{#if:second| |second }}{{#if:third{{=}}something| |third{{=}}something }}{{#if:...| |... }}{{#if:tenth| |tenth }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}{{{{#if:|subst:}}Template{{#if:first=something| |first=something }}{{#if:second| |second }}{{#if:third=something| |third=something }}{{#if:...| |... }}{{#if:tenth| |tenth }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} For more than ten parameters, possibly also containing equals-signs, use:

{{{{#if:|subst:}}tlx{{#if:Template|

|Template }}{{#if:<nowiki>''first''|''second''|''third=something''|...|''999th''</nowiki>| |<nowiki>''first''|''second''|''third=something''|...|''999th''</nowiki> }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}{{{{#if:|subst:}}Template{{#if:first|second|third=something|...|999th| |first|second|third=something|...|999th }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

Purpose and naming

Mnemonically, "[t]emplate [l]ink e[x]panded" (after {{{{#if:|subst:}}tl{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}, "[t]emplate [l]ink").

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 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 "&#124;..."). A keyword parameter can be used with equals code &#61; or {{=}} or in nowiki-text: "Template:Tag" or all parameters as a string in "Template:Tag" tags; see Examples at bottom. For more details, see this talk page.

  • Exceptions: If the intended template lists numerous parameters, then perhaps this template should really not be used, and just hardcode the usage with Template:TagTemplate:Tag, for example: Template:Tag. 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 Template:Tag.

Parameters

  • If given no additional parameters except  'template name' ({{{1}}}),  it presents the same as the similar {{Tl}} macro template -- a blue link nested in curly-braces-- the same as a user would apply the template without parameters, but with a noticeably clearer font and spacing on most modern browsers.

|Tl }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} display compared to {{{{#if:|subst:}}Tlx{{#if:Tl| |Tl }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}: (Tl: {{Tl}} versus Tlx: {{{{#if:|subst:}}Tl{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}})

  • Comparatively, {{{{#if:|subst:}}Tl{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} will not take or display additional parameters, and for minor technical reasons, may be preferred for mere listing and referencing in long pages involving a lot of template expansions.

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} has a named parameter Template:Para. Setting this parameter to any non-blank value will place the string "subst:" before the template name, linked to Help:Substitution. This is useful to indicate when a template should be substituted. For example {{{{#if:|subst:}}Tlx{{#if:Welcome| |Welcome }}{{#if:subst=Y| |subst=Y }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} will display {{{{#if:Y|subst:}}Welcome{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}. This is similar to the action of the {{{{#if:|subst:}}tlxs{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} template: {{{{#if:|subst:}}Tlxs{{#if:Welcome| |Welcome }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} will display Template:Tlxs.

Documentation

{{Tlx}} is a generalization of {{Tl}}, {{Tlp}}, et cetera with arguably better readable output. This depends on the browser, but too narrow uses of "{", "|", "}" in conjunction with links can be hard to read.

Usage

{{Tlx|template name}}
{{Tlx|template name|param}}
{{Tlx|template name|1|2|3|4|5|6|7|8|9|10}}
{{Tlx|template name|1|2|3|4|5|6|7|8|9|10&#124;more}}
{{Tlx|template name|param&#61;value}}

Up to 10 placeholders for parameters of the specified template

Examples

{{#ifeq:wiki.jriver.com|Wikipedia|| {{#ifeq:wiki.jriver.com|Meta||

Note
On the source sister projects, en.wikipedia and Meta, 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.

}}}}

Code Result Remark
subst:}}Tlx{{#if:x0|

|x0 }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x0{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

 
subst:}}Tlx{{#if:Abc|

|Abc }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}Abc{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

 
subst:}}Tlx{{#if:ABC|

|ABC }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}ABC{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

 
subst:}}Tlx{{#if:AbC|

|AbC }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}AbC{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

 
subst:}}Tlx{{#if:x1|

|x1 }}{{#if:one| |one }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x1{{#if:one|

|one }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

 
subst:}}Tlx{{#if:x2|

|x2 }}{{#if:one| |one }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x2{{#if:one|

|one }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

 
subst:}}Tlx{{#if:x3|

|x3 }}{{#if:1| |1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:5| |5 }}{{#if:6| |6 }}{{#if:7| |7 }}{{#if:8| |8 }}{{#if:9|10| |9|10 }}{{#if:| |... }}}}

subst:}}x3{{#if:1|

|1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:5| |5 }}{{#if:6| |6 }}{{#if:7| |7 }}{{#if:8| |8 }}{{#if:9| |9 }}{{#if:10| |10 }}{{#if:| |... }}}}

 
subst:}}Tlx{{#if:x4|

|x4 }}{{#if:1| |1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:5| |5 }}{{#if:6| |6 }}{{#if:7| |7 }}{{#if:8| |8 }}{{#if:9|10|11| |9|10|11 }}{{#if:| |... }}}}

subst:}}x4{{#if:1|

|1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:5| |5 }}{{#if:6| |6 }}{{#if:7| |7 }}{{#if:8| |8 }}{{#if:9| |9 }}{{#if:10| |10 }}{{#if:11| |... }}}}

up to 10 parameters, then ...
subst:}}Tlx{{#if:x5|

|x5 }}{{#if:1| |1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:5| |5 }}{{#if:6| |6 }}{{#if:7| |7 }}{{#if:8| |8 }}{{#if:9|10&#124;11| |9|10&#124;11 }}{{#if:| |... }}}}

subst:}}x5{{#if:1|

|1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:5| |5 }}{{#if:6| |6 }}{{#if:7| |7 }}{{#if:8| |8 }}{{#if:9| |9 }}{{#if:10|11| |10|11 }}{{#if:| |... }}}}

&#124; for more
{{{{#if:|subst:}}Tlx{{#if:convert|

|convert }}{{#if:<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>| |<nowiki>14|m|ftin|abbr=out|sp=us</nowiki> }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

unlimited parameters as one nowiki string
subst:}}Tlx{{#if:x1|

|x1 }}{{#if:x=u| |x=u }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x1{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

= won't work
subst:}}Tlx{{#if:x1|

|x1 }}{{#if:x&#61;u| |x&#61;u }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x1{{#if:x=u|

|x=u }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

&#61; is okay
subst:}}Tlx{{#if:x1|

|x1 }}{{#if:x{{=}}u| |x{{=}}u }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x1{{#if:x=u|

|x=u }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

{{=}} is okay
subst:}}Tlx{{#if:x1|

|x1 }}{{#if:<nowiki>x=u</nowiki>| |<nowiki>x=u</nowiki> }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x1{{#if:x=u|

|x=u }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

sticky nowiki is okay
subst:}}Tlx{{#if:x2|

|x2 }}{{#if: | |  }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x2{{#if: |

| }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

empty won't work
subst:}}Tlx{{#if:x2|

|x2 }}{{#if:&#32;| |&#32; }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x2{{#if: |

| }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

&#32; is okay
subst:}}Tlx{{#if:x2|

|x2 }}{{#if:&nbsp;| |&nbsp; }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x2{{#if: |

|  }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

&nbsp; is okay
subst:}}Tlx{{#if:x2|

|x2 }}{{#if: &#124; two| | &#124; two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

subst:}}x2{{#if: | two|

| | two }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

&#124; is okay
{{{{#if:|subst:}}Tlx{{#if:x2|

|x2 }}{{#if: {{!}} two| | {{!}} two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

{{{{#if:|subst:}}x2{{#if: | two|

| | two }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

{{{{#if:|subst:}}!{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} is dubious

{{{{#if:|subst:}}Tlx{{#if:x2|

|x2 }}{{#if:2=| |2= }}{{#if:3=two| |3=two }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

{{{{#if:|subst:}}x2{{#if:|

| }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

empty really doesn't work
{{{{#if:|subst:}}Tlx{{#if:x2|

|x2 }}{{#if:2=one| |2=one }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

{{{{#if:|subst:}}x2{{#if:two|

|two }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

two clobbers 2=one
{{{{#if:|subst:}}Tlx{{#if:x2|

|x2 }}{{#if:3=two| |3=two }}{{#if:2=one| |2=one }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

{{{{#if:|subst:}}x2{{#if:one|

|one }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}

right to left okay

See also

  • Template:Tlxb – same as {{Tlx}}, but gives the template name in boldface type (this can be useful when stressing the difference between two similarly named templates). Template:Tlb is the same, except it uses regular text instead of a monospaced non-proportional font.
  • Template:Temt, – same as {{Tlx}}, but handles template names with the Template: prefix and templates not in the Template: namespace {{ns:10}}.
  • Template:Para – for giving examples of template parameters and values only, instead of entire templates with parameters.