Terraria Wiki
Template-info.svg 文档 以下文档来自Template:Tl/doc。(编辑 | 历史

This template returns an exemplary use of a template while linking to the template description page, if the template exists. It can also handle parser functions.


All parameters are optional.

  • Templates: {{ tl | <template name> | <template parameter 1> | ... | <template parameter n> | nl = y }}
  • Parser functions: {{ tl | #<parser function name>: | <parser function parameter 1> | ... | <parser function parameter n> | nl = y }}
First unnamed parameter

Template (without the Template: prefix) or parser function name. The colon at the end of the parser function's name may be omitted, or it may immediately be followed by the parser function's first parameter.

Unnamed parameters

Other parameters, ad infinitum.


Set this parameter to suppress the link to the template/parser function documentation. Links to parser function documentation are stored in Template:Tl/parser function links.


Set this parameter to wrap the output in <code> tags.


  • To display named parameters or to otherwise include equals signs, use {{=}}. Unescaped equals signs will cause the entire parameter to be hidden.


Code Result
{{tl|stub}} {{stub}}
{{tl|stub|1}} {{stub|1}}
{{tl|stub|1|2}} {{stub|1|2}}
{{tl|nl=y|stub|1|2}} {{stub|1|2}}
{{tl|code=y|stub|1|2}} {{stub|1|2}}
{{tl|nl=y|code=y|stub|1|2}} {{stub|1|2}}
{{tl|#if}} {{#[[[:Template:Tl/parser function links]]##if if]:}}
{{tl|#if:}} {{#[[[:Template:Tl/parser function links]]##if if]:}}
{{tl|#if:condition}} {{#[[[:Template:Tl/parser function links]]##if if]:condition}}
{{tl|#if:condition|then|else}} {{#[[[:Template:Tl/parser function links]]##if if]:condition|then|else}}
{{tl|#listmap:|list{{=}}1, 2, 3}} {{#[[[:Template:Tl/parser function links]]##listmap listmap]:|list=1, 2, 3}}