Template:TLX

From Electronics Chat

Jump to: navigation, search
{{Tlx{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||etc.}}}} {{#if: | }} {{#if: {{{wpd}}} | }} {{#if: {{{cms}}} | {{#ifeq: Electronics Chat|Wikimedia Commons | | }} }} {{#if: {{{wbk}}} | {{#ifeq: Electronics Chat|Wikibooks | | }} }} {{#if: | {{#ifeq:Electronics Chat|Wikiquote| | }} }} {{#if: | {{#ifeq:Electronics Chat|Wikisource| | }} }} {{#if: | {{#if: | }} }} {{#if: | {{#if: | }} }} {{#if: {{{wsp}}} | {{#ifeq:Electronics Chat|Wikispecies| | }} }} {{#if: {{{wvy}}} |

{{#ifeq:Electronics Chat|Wikiversity

| | }} }} {{#if: | }}
Similar templates at English sister projects [edit]
File:Wikimedia-logo.svg mta Meta-wiki TLX
File:Wikipedia-logo.png wpd Wikipedia TLX
File:Commons-logo.svg cms Commons TLX TLX
File:Wikibooks-logo.svg wbk WikibooksTLX TLX
File:Wikiquote-logo.svg wqt WikiquoteTLX TLX
File:Wikisource-logo.svg wsr WikisourceTLX TLX
File:Wiktionary-logo-en.png wdy Wiktionary tLX
File:Wikinews-logo.svg wnw Wikinews TLX
File:Wikispecies-logo.svg wsp WikispeciesTLX TLX
File:Wikiversity-logo.svg wvy Wikiversity TLX TLX
File:Mediawiki.png mdw Mediawiki TLX

Usage: {{Tlx{{#if:template name| |template name }}{{#if:first parameter| |first parameter }}{{#if:...| |... }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}
Up to three parameters for the specified template are displayed as placeholders, more parameters are shown as "|etc.", for details see the en.talk page.

[edit] Documentation

{{TLX}} is a generalization of {{Tl{{#if:x| |x }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}, {{Tlp{{#if:x| |x }}{{#if:y| |y }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}, {{Tl2{{#if:x| |x }}{{#if:y| |y }}{{#if:z| |z }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}, etc. with arguably better readable output. This depends on the browser, but too narrow uses of "{", "|", "}" in conjunction with links can be hard to read.

[edit] Usage

{{TLX|template name}}
{{TLX|template name|param}}
{{TLX|template name|1|2|3}}
{{TLX|template name|1|2|3|more}}
{{TLX|template name|param=value}}

Up to three placeholders for parameters of the specified template

[edit] Example

Note
On the source sister project, en.wikipedia, X0, X1, X2,..., X9 are sandbox templates for experimentation. Here they show as redlinks, as no auto-cleansing software facility exists.
Code Result Remark
{{Tlx{{#if:x0|

|x0 }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x0{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

 
{{Tlx{{#if:x1|

|x1 }}{{#if:one| |one }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x1{{#if:one|

|one }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

 
{{Tlx{{#if:x2|

|x2 }}{{#if:one| |one }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x2{{#if:one|

|one }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

 
{{Tlx{{#if:x3|

|x3 }}{{#if:1<tt>|2|3| |1|2|3 }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</tt>

{{x3{{#if:1|

|1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

 
{{Tlx{{#if:x4|

|x4 }}{{#if:1<tt>|2|3| |1|2|3 }}{{#if:4| |4 }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</tt>

{{x4{{#if:1|

|1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:| |... }}}}

up to 3 parameters
{{Tlx{{#if:x4|

|x4 }}{{#if:1<tt>|2|3&#124;4| |1|2|3&#124;4 }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}</tt>

{{x4{{#if:1|

|1 }}{{#if:2| |2 }}{{#if:3|4| |3|4 }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

&#124; for more
{{Tlx{{#if:x1|

|x1 }}{{#if:x=u| |x=u }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x1{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x1 }}{{#if:x&#61;u| |x&#61;u }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x=u }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x1 }}{{#if:<nowiki>x=u</nowiki>| |<nowiki>x=u</nowiki> }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x=u }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x2 }}{{#if: | |  }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x2{{#if: |

| }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x2 }}{{#if:&#32;| |&#32; }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x2{{#if: |

| }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x2 }}{{#if:&nbsp;| |&nbsp; }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x2{{#if: |

|  }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x2 }}{{#if: &#124; two| | &#124; two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x2{{#if: | two|

| | two }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x2 }}{{#if: {{!}} two| | {{!}} two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x2{{#if: | two|

| | two }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{!{{#if:|

|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} is dubious

{{Tlx{{#if:x2|

|x2 }}{{#if:2=| |2= }}{{#if:3=two| |3=two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x2{{#if:|

| }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x2 }}{{#if:2=one| |2=one }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x2{{#if:two|

|two }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

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

|x2 }}{{#if:3=two| |3=two }}{{#if:2=one| |2=one }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

{{x2{{#if:one|

|one }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}

right to left okay

Personal tools