Template:Template link general/doc: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content deleted Content added
update examples |
document "brace" |
||
Line 9: | Line 9: | ||
{| class="wikitable" |
{| class="wikitable" |
||
! Parameter || Action || As in |
! Parameter || Action || As in |
||
|- |
|||
| brace || Include braces as part of the template link || |
|||
|- |
|- |
||
| braceinside || Include innermost braces as part of the template link || {{tl|tlw}} |
| braceinside || Include innermost braces as part of the template link || {{tl|tlw}} |
||
Line 55: | Line 57: | ||
| {{tlx|tlg|x0|nolink{{=}}on}} | {{tlg|x0|nolink=on}} | |
| {{tlx|tlg|x0|nolink{{=}}on}} | {{tlg|x0|nolink=on}} | |
||
| {{tlx|tlg|x0|subst{{=}}on}} | {{tlg|x0|subst=on}} | |
| {{tlx|tlg|x0|subst{{=}}on}} | {{tlg|x0|subst=on}} | |
||
| {{tlx|tlg|x0| |
| {{tlx|tlg|x0|brace{{=}}on}} | {{tlg|x0|brace=on}} | all braces in link |
||
| {{tlx|tlg|x0|braceinside{{=}}on}} | {{tlg|x0|braceinside=on}} | inside braces in link |
|||
| {{tlx|tlg|x0|alttext{{=}}x0 link}} | {{tlg|x0|alttext=x0 link}} | |
| {{tlx|tlg|x0|alttext{{=}}x0 link}} | {{tlg|x0|alttext=x0 link}} | |
||
| {{tlx|tlg|x0|bold{{=}}on|code{{=}}on| |
| {{tlx|tlg|x0|bold{{=}}on|code{{=}}on|brace{{=}}on}} | {{tlg|x0|bold=on|code=on|brace=on}} | No reason you can't combine multiple parameter settings |
||
| {{tlx|tlg|x1|one}} | {{tlg|x1|one}} | |
| {{tlx|tlg|x1|one}} | {{tlg|x1|one}} | |
||
| {{tlx|tlg|x2|one|two}} | {{tlg|x2|one|two}} | |
| {{tlx|tlg|x2|one|two}} | {{tlg|x2|one|two}} | |
Revision as of 00:14, August 4, 2018
This is a documentation subpage for Template:Template link general. It may contain usage information, categories and other content that is not part of the original template page. |
{{tlg}} (abbreviating "[t]emplate [l]ink Template:Small [g]eneral Template:Small") is a generalised version of the {{tl}} ("template link") template. It can be used to replace or implement {{tl}} and related templates such as {{tlb}}, {{tlx}}, etc.
Parameters
Named
With the exception of Template:Mono, {{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 (see Examples below):
Parameter | Action | As in |
---|---|---|
brace | Include braces as part of the template link | |
braceinside | Include innermost braces as part of the template link | {{tlw}} |
bold boldlink boldname |
Renders the template link/name in bold | {{tlb}}, {{tlx}}, etc. |
code | Display output using HTML <code>...</code> tags (monospaced font) |
{{tlc}}, {{tlx}}, etc. |
plaincode | Uses <code style="border:none; background:transparent;">...</code> |
|
kbd | Display output using HTML <kbd>...</kbd> tags (monospaced font) |
{{tltt}}, {{tltt2}}, etc. |
italic italics |
Display any parameters accompanying the template link/name in italic/s | {{tlxi}} |
nolink | Don't render the template name as a link | {{tln}} |
nowrap | Prevent the insertion of line breaks (word wrap) in the output | {{tlp}}, {{tlf}}, etc. |
nowrapname | Prevent word wrapping in the output of template name/link (parameters will wrap if needed) | |
subst | Include a subst: prefix before the template link/name | {{tls}} |
|alttext=[text] | Use [text] as the label for the template link | {{tla}} |
Unnamed
{{tlg}} may take up to ten unnamed parameters as parameters accompanying the template link (or name); see Examples below.
Examples
- 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.
Script error: No such module "aligned table".
Code | Output |
---|---|
{{tlg|long template name that would wrap to new line|this is a long value for the 1st parameter that would wrap}}
|
{{Template:!((:Template:Long template name that would wrap to new line|long template name that would wrap to new line]]|this is a long value for the 1st parameter that would wrap}} |
Code | Output |
---|---|
{{tlg|nowrap=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}}
|
{{Template:!((:Template:Long template name that would wrap to new line|long template name that would wrap to new line]]|long value for the 1st parameter that would wrap}} |
Code | Output |
---|---|
{{tlg|nowrapname=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}}
|
{{Template:!((:Template:Long template name that would wrap to new line|long template name that would wrap to new line]]|long value for the 1st parameter that would wrap}} |
See also
Template:Template-linking templates