Difference between revisions of "Template:Tlx"

From GodWiki
Jump to navigation Jump to search
m (Created page with "<includeonly><tt><nowiki>{{</nowiki>{{#if:{{{subst|}}}|subst:}}[[{{{LANG|}}}{{{SISTER|}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!-- -->{{#if:{{{2|}}}| |{{…")
 
m (Adding Category:Formatting templates)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><tt><nowiki>{{</nowiki>{{#if:{{{subst|}}}|[[Help:Substitution|subst]]:}}[[{{{LANG|}}}{{{SISTER|}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!--
+
<includeonly><!--
-->{{#if:{{{2|}}}|
+
    --><code><!--
&#124;{{{2}}}
+
        --><nowiki>{{</nowiki>{{#if:{{{subst|}}} |subst:}}<!--
}}<!--
+
            -->[[{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!--
-->{{#if:{{{3|}}}|
+
                  -->{{#if:{{{2|}}} |&#124;{{{2}}}}}<!--
&#124;{{{3}}}
+
                  -->{{#if:{{{3|}}} |&#124;{{{3}}}}}<!--
}}<!--
+
                  -->{{#if:{{{4|}}} |&#124;{{{4}}}}}<!--
-->{{#if:{{{4|}}}|
+
                  -->{{#if:{{{5|}}} |&#124;{{{5}}}}}<!--
&#124;{{{4}}}
+
                  -->{{#if:{{{6|}}} |&#124;{{{6}}}}}<!--
}}<!--
+
                  -->{{#if:{{{7|}}} |&#124;{{{7}}}}}<!--
-->{{#if:{{{5|}}}|
+
                  -->{{#if:{{{8|}}} |&#124;{{{8}}}}}<!--
&#124;{{{5}}}
+
                  -->{{#if:{{{9|}}} |&#124;{{{9}}}}}<!--
}}<!--
+
                  -->{{#if:{{{10|}}} |&#124;{{{10}}}}}<!--
-->{{#if:{{{6|}}}|
+
                  -->{{#if:{{{11|}}} |&#124;{{{11}}}}}<!--
&#124;{{{6}}}
+
                  -->{{#if:{{{12|}}} |&#124;''''}}<!--
}}<!--
+
        --><nowiki>}}</nowiki><!--
-->{{#if:{{{7|}}}|
+
    --></code><!--
&#124;{{{7}}}
+
--></includeonly><noinclude>
}}<!--
+
{{doc}} [[Category:Templates]] [[Category:Linking templates|{{PAGENAME}}]] [[Category:Formatting templates|{{PAGENAME}}]]
-->{{#if:{{{8|}}}|
 
&#124;{{{8}}}
 
}}<!--
 
-->{{#if:{{{9|}}}|
 
&#124;{{{9}}}
 
}}<!--
 
-->{{#if:{{{10|}}}|
 
&#124;{{{10}}}
 
}}<!--
 
-->{{#if:{{{11|}}}|
 
&#124;{{{11}}}
 
}}<!--
 
-->{{#if:{{{12|}}}|
 
&#124;''...''
 
}}<nowiki>}}</nowiki></tt></includeonly><noinclude>
 
 
 
{{documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
 
</noinclude>
 
</noinclude>
 
[[Category:Templates]]
 

Latest revision as of 13:09, 3 October 2019

[view] [edit] [history] [refresh]
📚 Documentation

Basic use

(Note: In the following examples, ellipses (groups of three dots, e.g. ...) indicate where parameters have been omitted.)

{{tlx|Template|first parameter|second parameter|third|...|tenth}} produces: {{Template|first parameter|second parameter|third|...|tenth}}

Where parameters might contain one or more equals-signs ("="), replace each equals-sign with {{=}}:

{{tlx|Template|first{{=}}something|second|third{{=}}something|...|tenth}} produces: {{Template|first=something|second|third=something|...|tenth}}

For more than ten parameters, possibly also containing equals-signs, use <nowiki> thus:

{{tlx|Template|<nowiki>''first''|''second''|''third=something''|...|''999th''</nowiki>}} produces: {{Template|first|second|third=something|...|999th}}

Purpose and naming

Mnemonically, "[t]emplate [l]ink e[x]panded" (after {{tl}}, "[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.

Parameters

  • If the only parameter supplied is {{{1}}}, i.e. a template's name, {{tlx}}'s output is the same as {{tl}} – i.e. a link within braces – but in a monospaced font:
    • {{tl}} produces: {{tl}}
    • {{tlx}} produces: {{tl}}
{{tl}} will also not take nor display additional parameters.
Named parameters

|subst=

Setting this parameter to any non-blank value will prefix the string subst:. This is useful to indicate when a template should be substituted. For example, {{tlx|Unsigned|subst=Y}} produces: {{subst:Unsigned}}.

See also

Template:Tlx/doc on Wikipedia.