Template:Tlb
Appearance
Explanation
[edit source]This template is a copy of {{tlxb}} except that it uses normal text instead of non-proportional, monospaced text:
Code | Result | Remark |
---|---|---|
{{tlb|Template name}}
|
{{Template name}} | |
{{tlb|Template name|parm1|parm2}}
|
{{Template name|parm1|parm2}} | |
{{tlb|Template name|parm1|parm2{{=}}foo}}
|
{{Template name|parm1|parm2=foo}} | Equal signs need to be escaped using {{=}} .
|
{{tlb}}
|
{{[[Template:|]]}} | This actually substitutes the current page name. Useful as a self-reference; won't be linked. |
{{tlb|SISTER=m:|3x}}
|
{{3x}} | Link to page on another wiki. |
I.e., it's a {{tl}}-style template-link tag that boldfaces the template name, and accepts parameters. It's main use is in distinguishing between multiple templates with similar names, in documentation, talk page discussions, etc.
The rest of the documentation is for {{tlx}}, which works the same way (although it doesn't currently behave sanely when no parameters are given; use {{tlu}} instead).
{{tlx|template|first parameter|second|third|fourth|etc}} becomes →
{{template|first parameter|second|third|fourth|etc}}
Purpose and naming: Mnemonically 'Template list expanded'... named after {{tl}} 'Template list'
Usage
[edit source]- {{Tlb|template name}}
- {{Tlb|template name|param}}
- {{Tlb|template name|param=value}}
- This template takes a template-name and up to 128 optional number of associated parameters (or 'pass parameters'), and aggregates them into an 'example demonstration' of how the template might be used. It's primary use is in instruction and documentation such as this passage.
- Additionally, tlx can be used to demonstrate templates on other sister projects.
- If more than 128 associated parameters are given the remainder will be truncated to "...".
Examples
[edit source]Markup | Displays | Remarks |
---|---|---|
{{tlx|tlx}} | {{tlx}} | |
{{tlx|tlx|SISTER=w:}} | {{tlx|SISTER=w:}} | = won't work |
{{tlx|tlx|1|2|3|4}} | {{tlx|1|2|3|4}} | you can use | to get around the 128 limitation |
{{tlx|tlx|1|2|3{{!}}4}} | {{tlx|1|2|3|4}} | {{!}} also works |
{{tlx|tlx|SISTER=w:}} | {{tlx|SISTER=w:}} | you can use = to display named parameters |
{{tlx|tlx|<nowiki>SISTER=w:</nowiki>}} | {{tlx|SISTER=w:}} | sticky nowiki also works |
{{tlx|tlx| |two}} | {{tlx| |two}} | empty parameters work |
{{tlx|tlx|2=one|two}} | {{tlx|two}} | two clobbers 2=one |
{{tlx|tlx|3=two|2=one}} | {{tlx|one|two}} | right to left okay |