Template:Tc-namevar

From Angelina Jordan Wiki

Documentation

This template is used in template documentation to display wiki markup representing a template call with named paramaters and corresponding generic (variable) values, as shown in the examples below. It should only be used on talk pages or in template documentation (or help pages, user pages, etc.), not in articles.

Unlike Template:Tl and Template:Tlnc, this template does not provide a link on the name of the template in the displayed markup.

This template styles the template call as code. There is no option to display it as plain text.

The name of the template is based on the phrase "template call with named parameters and variable values".

Usage

  • {{tc-namevar|param 1 name|param 1 description|param 2 name|param 2 description|||add=|sp=}}

Up to 19 named parameters and their corresponding values can be shown. If you need more, of if you want to tack on additional parameters of a different type for some reason, you can use add as explained in the documentation of {{tc-var}}.

Setting sp to any true value adds space for (perhaps) increased readability.

Examples

  • {{tc-namevar}}{{}}
  • {{tc-namevar|}}{{}}
  • {{tc-namevar|ytv}}{{ytv}}
  • {{tc-namevar|ytv|v|video ID|linktext|text to be linked}}{{ytv|v=YouTube video ID|linktext=text to be linked}}

Obviously, the first three examples are not very useful; they're just here for "completeness".

See also

Full list of similar templates (including this one in bold):    [edit this list]

  • {{tc}} – no particular formatting of parameters, to render concrete examples like {{ytv|-wKoZlapqgg|Love Don't Let Me Go}}
  • {{tc-names}} – shows only parameter names with no values, like {{ytv|v=|t=|linktext=}}
  • {{tc-nameval}} – shows a concrete example with name-value pairs, like {{ytv|v=-wKoZlapqgg|linktext=Love Don't Let Me Go}}
  • {{tc-namevar}} – shows name-value pairs with generic (variable) values, like {{ytv|v=video ID|linktext=text to be linked}}
  • {{tc-numvar}} – shows numerical parameters with generic (variable) values, like {{ytv|1=video ID|2=text to be linked}}
  • {{tc-var}} – shows only variable values to explain positional parameters, like {{ytv|video ID|text to be linked}}