Namespaces
Variants
Actions

Template:tl

From cppreference.com

{{[[Template:{{{1}}}|tl|...]]}}

[edit] [{{purge}}] Template documentation

This is one of the templates used to refer to templates without inlining them.

{{tl|template |param1 (optional)|param2 (optional)|... }} - equivalent to {{template|param1|param2|...}}.

{{tlc|template |param1 (optional)|param2 (optional)|... }} - equivalent to {{template|param1|param2|...}}.

{{tlf|template |param1 (optional)|param2 (optional)|... }} - equivalent to {{template|param1|param2|...}}.


{{tl params|template |param list (optional)}} - Creates the template parameter list used for display, parameters in param list are separated by commas. The meaning of each parameter is displayed in italic , therefore if you are providing arguments (for example {{range|first|last}}), then {{tl}} is the better choice.

Each parameter is parsed as below:

  • If there is no equal sign, the parameter is specified to be provided by order, and the entire text is italicized.
  • If there is an equal sign, the parameter is specified to be provided with its parameter name, only the text following the equal sign is italicized ("2=" needs to be prepended to param list in this case).
  • If a question mark appears in the end, the parameter is optional, and the parameter text will be followed by (optional).

Examples:

  • {{tl params|tt|text}} will generate {{tt|text }}.
  • {{tl params|ltt|path,title?}} will generate {{ltt|path |title (optional)}}.
  • {{tl params|c|2=code,lang=language?}} will generate {{c|code |lang=language (optional)}}.