Explanation

edit

{{tlg}} (template link, general) is a general template for inserting a template link. It can be used to replace or implement any of the more specific {{tl*}} templates, e.g. {{tl}}, {{tlx}} or {{tlb}}. Parameters are:

  • bold=yes: Boldface the text, like for {{tlb}} and {{tlxb}}
  • italic=yes: Italicizes the parameters, like for {{tlxi}}
  • tt=yes: Use a monospaced font, like for {{tlx}} and {{tlxb}}
  • code=yes: Use the <code>...</code> HTML attribute (usually a monospaced font), like for {{tlc}}
  • nolink=yes: Don't insert a template link, like for {{tlf}}, {{tld}}, and {{tlc}}
  • anypage=yes: Allow linking to arbitrary page (not just template), as with {{tlu}}
  • braceinside=yes: Put braces inside the link, like for {{tn}}
  • subst=yes: Add a subst: prefix, like for {{tls}}
  • alttext=FOO: Specify alternative surface text for a link, like for {{tla}}

Examples

edit
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.
Code Result Remark
{{Tlg|Abc}} Template:Tlg  
{{Tlg|ABC}} Template:Tlg  
{{Tlg|AbC}} Template:Tlg  
{{Tlg|x0}} Template:Tlg  
{{Tlg|x0|bold=yes}} Template:Tlg  
{{Tlg|x1|one|italic=yes}} Template:Tlg  
{{Tlg|x0|code=yes}} Template:Tlg  
{{Tlg|x0|tt=yes}} Template:Tlg  
{{Tlg|x0|nolink=yes}} Template:Tlg  
{{Tlg|x0|subst=yes}} Template:Tlg  
{{Tlg|x0|braceinside=yes}} Template:Tlg  
{{Tlg|x0|alttext=Link to x0 template}} Template:Tlg  
{{Tlg|x0|anypage=yes}} Template:Tlg Now the expression links to x0 (the spaceship, genetic disease, etc.) rather than Template:x0. Mostly useful for templates in user space.
{{Tlg|x0|bold=yes|tt=yes|braceinside=yes}} Template:Tlg No reason you can't combine multiple parameter settings.
{{Tlg|x1|one}} Template:Tlg  
{{Tlg|x2|one|two}} Template:Tlg  
{{Tlg|x2|bold=yes|tt=yes|one|...}} Template:Tlg Can combine named and anonymous parameters ...
{{Tlg|x2|one|two|bold=yes|...}} Template:Tlg ... in any order …
{{Tlg|x2|one|tt=yes|two|...}} Template:Tlg ... even intermixed ...
{{Tlg|x2|one|tt=yes|two|...}} Template:Tlg ... with many different configurations.
{{Tlg|x3|1|2|3|...}} Template:Tlg  
{{Tlg|x4|1|2|3|...}} Template:Tlg up to 10 parameters, then ...
{{Tlg|x5|1|2|3|...}} Template:Tlg &#124; for more
{{Tlg|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}} unlimited parameters as one nowiki string
{{Tlg}} Template:Tlg with no arguments, the current page name is substituted
{{Tlg|x1|x=u}} Template:Tlg = won't work
{{Tlg|x1|x&#61;u}} Template:Tlg &#61; is okay
{{Tlg|x1|x{{=}}u}} Template:Tlg {{=}} is okay
{{Tlg|x1|<nowiki>x=u</nowiki>}} Template:Tlg sticky nowiki is okay
{{Tlg|x2| |two}} Template:Tlg empty won't work
{{Tlg|x2|&#32;|two}} Template:Tlg &#32; is okay
{{Tlg|x2|&nbsp;|two}} Template:Tlg &nbsp; is okay
{{Tlg|x2| &#124; two}} Template:Tlg &#124; is okay
{{Tlg|x2| {{!}} two}} Template:Tlg Template:Tlg is dubious
{{Tlg|x2|2=|3=two}} Template:Tlg empty really doesn't work
{{Tlg|x2|2=one|two}} Template:Tlg two clobbers 2=one
{{Tlg|x2|3=two|2=one}} Template:Tlg right to left okay