Template:Tlg/doc

From Summertime Saga Wiki
< Template:Tlg
Revision as of 20:48, 21 July 2020 by Casiope (talk | contribs) (Created page with "The template {{tlg|tlg}} (abbreviating “[t]emplate [l]ink (with) [g]eneral (options)”) is a generalised “template link” template. == Parameters == === Named === Wit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The template {{tlg}} (abbreviating “[t]emplate [l]ink (with) [g]eneral (options)”) is a generalised “template link” template.

Parameters

Named

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:

|brace= 
Include braces as part of the template link.
|braceinside= 
Include innermost braces as part of the template link.
|bold=, |boldlink=, |boldname= 
Renders the template link/name in bold.
|code= 
Display output using HTML <code>…</code> tags (monospaced font)
|plaincode= 
Use <code style="border:none; background:transparent;">…</code>.
|kbd= 
Display output using HTML <kbd>…</kbd> tags (monospaced font).
|italic=, |italics= 
Display any parameters accompanying the template link/name in italic.
|nolink= 
Don't render the template name as a link.
|nowrap= 
Prevent the insertion of line breaks (word wrap) in the output.
|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.
|alttext 
Use [text] as the label for the template link.

Unnamed (positional)

{{tlg}} may take up to ten unnamed parameters accompanying the template link (or name).

Examples

Markup Renders as Remarks
{{tlg|Termometro}} {{Termometro}} Template:Error template does not exist. Be aware with linking to non-existing templates, although desired.
{{tlg|ok}} {{button}} Button template does exist
m|ftin|abbr=out|sp=us</nowiki>}} {{convert|14|m|ftin|abbr=out|sp=us}} Unlimited parameters as one <nowiki>…</nowiki>
{{tlg|Template}} {{Template}}
{{tlg|templatE}} {{templatE}} template names are case-sensitive
{{tlg|template}} {{template}} first letter is case-insensitive though
{{tlg|template|code=on}} {{template}} <code> style
{{tlg|template|plaincode=on}} {{template}} plaincode style
{{tlg|template|kbd=on}} {{template}} <kbd> style
{{tlg|template|bold=on}} {{template}} bold link or name
{{tlg|template|one|italic=on}} {{template|one}} parameter/s in italics
{{tlg|template|nolink=on}} {{template}}
{{tlg|template|subst=on}} {{subst:template}}
{{tlg|template|brace=on}} {{template}} all braces in link
{{tlg|template|braceinside=on}} {{template}} inside braces in link
{{tlg|template|alttext=x0 link}} {{x0 link}}
{{tlg|template|bold=on|code=on|brace=on}} {{template}} Multiple parameter settings can be combined.
{{tlg|x1|one}} {{x1|one}}
{{tlg|x2|one|two}} {{x2|one|two}}
{{tlg|x2|bold=on|code=on|one|two}} {{x2|one|two}} Can combine named and anonymous parameters …
{{tlg|x2|one|two|bold=on|code=on}} {{x2|one|two}} … in any order …
{{tlg|x2|one|code=on|two|bold=on|three}} {{x2|one|two|three}} … even intermixed …
{{tlg|x2|one|code=on|two|bold=on|three|italic=on}} {{x2|one|two|three}} … with many different configurations.
{{tlg|x3|1|2|3|4|5|6|7|8|9|10}} {{x3|1|2|3|4|5|6|7|8|9|10}}
{{tlg|x4|1|2|3|4|5|6|7|8|9|10|11}} {{x4|1|2|3|4|5|6|7|8|9|10|…}} up to 10 parameters, then …
{{tlg|x5|1|2|3|4|5|6|7|8|9|10&#124;11}} {{x5|1|2|3|4|5|6|7|8|9|10|11}} &amp;#124; for more
{{tlg}} {{Template:Tlg/doc}} with no arguments, the current page name is substituted
{{tlg|x1|x=u}} {{x1}} {{=}} won't work
{{tlg|x1|x&#61;u}} {{x1|x=u}} &amp;#61; is okay
{{tlg|x1|x{{=}}u}} {{x1|x=u}} {{=}} is okay
{{tlg|x1|x<nowiki>=</nowiki>u}} {{x1|x=u}} sticky nowiki is okay
{{tlg|x2||two||}} {{x2||two||}} empty parameters work too, even at the end
{{tlg|x2|3=two|2=one}} {{x2|one|two}} right to left okay
Wrapping of long names (default)
Markup Renders as
{{tlg|long template name that would wrap to new line|this is a long value for the 1st parameter that would wrap}} {{long template name that would wrap to new line|this is a long value for the 1st parameter that would wrap}}
Wrapping of long names (nowrap=on)
Markup Renders as
{{tlg|nowrap=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}} {{long template name that would wrap to new line|long value for the 1st parameter that would wrap}}
Wrapping of long names (nowrapname=on)
Markup Renders as
{{tlg|nowrapname=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}} {{long template name that would wrap to new line|long value for the 1st parameter that would wrap}}