Template:Tlg/doc
From MozillaWiki
{{tlg}} (template link [with] general [options]") is a generalised version of the {{tl}} ("template link") template. It can be used to replace or implement {{tl}} and related templates.
Parameters
Named parameters
With the exception of alttext, {{tlg}}'s named parameters are toggles that are either omitted (default) or activated (by being assigned a value such as "on", "yes", "true", "include", etc). They may be included in any order:
Parameter | Description |
---|---|
braceinside |
Includes the innermost braces as part of the template link |
bold boldlink boldname |
Renders the template link/name in bold |
code |
Displays output using the HTML <code> formatting |
plaincode |
Displays output using <code> without any CSS border or background styling |
italic italics |
Displays any parameters accompanying the template link/name in italic/s |
nolink |
Prevents the template name from being rendered as a link |
nowrap |
Prevents the insertion of line breaks (word wrap) in the output |
subst |
Includes a subst: prefix before the template link/name |
alttext |
Replaces the template link label with a custom text string |
Unnamed parameters
{{tlg}} may take up to ten unnamed parameters as parameters accompanying the template link (or name).
Examples
What you write | What you see | Notes |
---|---|---|
Admon}} | {{Admon}} | |
admoN}} | {{admoN}} | template names are case-sensitive |
admon}} | {{admon}} | first letter is case-insensitive though |
{{tlg}} |
{{Tlg/doc}} | |
admon|code=on}} | {{admon}} |
<code> style |
admon|plaincode=on}} | {{admon}} | plaincode style |
admon|bold=on}} | {{admon}} | bold link/name |
admon|1|italic=on}} | {{admon|1}} | parameter/s in italics |
admon|nolink=on}} | {{admon}} | |
admon|subst=on}} | {{subst:admon}} | |
admon|braceinside=on}} | {{admon}} | |
admon|alttext=admonition templates}} | {{admonition templates}} | |
admon|bold=on|code=on|braceinside=on}} | {{admon}} |
No reason you can't combine multiple parameter settings |
admon|1}} | {{admon|1}} | |
admon|1|2}} | {{admon|1|2}} | |
admon|bold=on|code=on|1|2}} | {{admon|1|2}} |
Can combine named and anonymous parameters … |
admon|1|2|bold=on|code=on}} | {{admon|1|2}} |
… in any order … |
admon|1|code=on|2|bold=on|3}} | {{admon|1|2|3}} |
… even intermixed … |
admon|1|code=on|2|bold=on|3|italic=on}} | {{admon|1|2|3}} |
… with many different configurations. |
admon|1|2|3|4|5|6|7|8|9|10}} | {{admon|1|2|3|4|5|6|7|8|9|10}} | |
admon|1|2|3|4|5|6|7|8|9|10|11}} | {{admon|1|2|3|4|5|6|7|8|9|10|11}} | up to 11 parameters + template name, then … |
admon|1|2|3|4|5|6|7|8|9|10|11}} | {{admon|1|2|3|4|5|6|7|8|9|10|11}} | | for more |
{{tlg}} |
{{Tlg/doc}} | with no arguments, the current page name is substituted |
admon|x=u}} | {{admon|x=u}} | = won't work |
admon|x=u}} | {{admon|x=u}} | = is okay |
admon|x{{=}}u}} | {{admon|x=u}} | {{=}} is okay |
admon|x<nowiki>=</nowiki>u}} | {{admon|x=u}} | sticky nowiki is okay
|
admon||2||}} | {{admon||2||}} | empty parameters work too, even at the end |
admon|2=1|2}} | {{admon|2=1|2}} | 2 clobbers 2=1 |
admon|3=2|2=1}} | {{admon|3=2|2=1}} | right to left okay
|
- Unlimited parameters as one nowiki string
{{tlg|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}