Template:Tlp/Doc

From Starfield Wiki
Jump to: navigation, search

Summary[edit]

This template is used to display a template name as a link surrounded by braces, along with any required parameters, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.

This template was originally copied from Wikipedia. Unlike the Wikipedia version, this version can take an unlimited number of parameters.

Parameters[edit]

Tlp
Parameter Scope Description
1 required The name of the template to link to.
sepbefore optional Separator to display before each vertical pipe character.
sepafter optional Separator to display after each vertical pipe character.
display optional Display name for the template, to preserve the text of older talk page posts.
mw optional Set to any value to indicate that the first parameter is a magic word rather than a template. The magic word will then link to Wikipedia's Magic words help page when clicked.
(others) optional Additional parameter names. (Don't forget to escape equals signs with {{=}}, &#61; or <nowiki>=</nowiki>, or number any unnamed parameters that require them.)

Examples[edit]

Link Type Code Result
Link only (same as {{tl}})
{{tlp|example}}
{{example}}
Link with parameter names
{{tlp|example|parm1|parm2}}
{{example|parm1|parm2}}
Link with parameter names and values
{{tlp|example | 2=parm1=value1 | 3=parm2=value2}}
{{example |parm1=value1|parm2=value2}}
Link with large number of parameters, escaped equals signs, sepbefore and sepafter
{{tlp|example |parm1{{=}}value1 |parm2{{=}}value2 |parm3{{=}}value3 |parm4{{=}}value4 |parm5{{=}}value5 |parm6{{=}}value6 |parm7{{=}}value7 |parm8{{=}}value8 |parm9{{=}}value9 |parm10{{=}}value10 |parm11{{=}}value11 |parm12{{=}}value12 |sepbefore=&#32; |sepafter=&nbsp;}}
{{example | parm1=value1 | parm2=value2 | parm3=value3 | parm4=value4 | parm5=value5 | parm6=value6 | parm7=value7 | parm8=value8 | parm9=value9 | parm10=value10 | parm11=value11 | parm12=value12}}

See Also[edit]

  • {{tl}} - Template link with proportionally-spaced font
  • {{tl2}} - Template link with mono-spaced font
  • {{tlx}} - Template link with mono-spaced font and parameters

This page uses material from the UESP article "Template:Tlp".