Template:Template parameters table row

From Valve Developer Community
Jump to navigation Jump to search
English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Template Documentation
Icon-strings.png Template strings
Icon-translate.png Documentation language
...

A table row for describing template parameters.

Usage

This template is usually written in a column. To use it, insert {{Template parameters table row}} on the desired page and specify the parameters described below under the template name in the following format:

{{Template parameters table row | parameter1 = value | parameter2 = value }}
Icon-Important.pngImportant: Used in combination with {{Template parameters table}}.
Parameter Description Examples Preview
No parameter This template requires at least parameter 1. Inclusion without it is not supported.
{{Template parameters table row}}
1 / param Parameter or preset name.
Available presets:
  • np-atleast - inserts a row with "requires at least parameter 1". Use the 2 parameter to change the required parameter within the string.
| <code>param1</code>
| 1 = <code>param2</code>
| param = <code>param3</code> / <code>param3alt</code>
2 / desc Parameter description or custom parameter entry in the np-atleast preset string.
| Hello, Gordon! 
| 2 = Hello, Alyx! 
| desc  = Hello, Eli!
3 / example Parameter example.
Icon-Important.pngImportant: Use named parameters (3 = and example =) in additional examples instead of unnamed ones if rowspawn is used.
| {{quote|Hello, Gordon!}} 
| 3 = {{quote|Hello, Alex!}} 
| example = {{quote|Hello, Eli!}}
4 / preview Parameter preview.
Icon-Important.pngImportant: Use named parameters (4 = and preview =) in additional previews instead of unnamed ones if rowspawn is used.
| {{quote|Hello, Gordon!}} 
| 4 = {{quote|Hello, Alex!}} 
| preview = {{quote|Hello, Eli!}}
rowspan Defines how many rows the parameter name and its description will span.
Use this to provide multiple examples or previews for a single parameter.
The default value is 1
Icon-Important.pngImportant: If rowspan is used, all additional rows for this parameter must use named parameters (e.g., example = or preview =) instead of unnamed ones.
| rowspan = 4
rowspan-affect [Todo]
| rowspan-affect = preview
example-only [Todo]
| example-only = true
preview-only [Todo]
| example-only = true
rowspan-affect [Todo]
| rowspan-affect = preview
vertical-align Specifies the vertical alignment of the parameter name and its description.
Useful when a single parameter has many rows of examples.
Only the top value is supported.
| vertical-align = top
split-example Replaces the example column with a #Preview link to a section below.
Useful for content that exceeds standard column width.
Only the section value is supported.
Icon-Important.pngImportant: Requires specifying the same parameter for the Template parameters table.
| split-example = section
split-preview Replaces the example column with a #Preview link to a section below.
Useful for content that exceeds standard column width.
Only the section value is supported.
Icon-Important.pngImportant: Requires specifying the same parameter for the Template parameters table.
| split-preview = section

Preview

{{Template parameters table
|	{{Template parameters table row
	| <code>gordon</code>
	| A crazy guy with a crowbar in his hand.
	| <nowiki>| gordon = green</nowiki>
	| [[File:info player start.png|64px]]
	}}
}}
Parameter Description Examples Preview
gordon A crazy guy with a crowbar in his hand.
| gordon = green
Info player start.png

Preview as a standalone section

{{Template parameters table
| split-example = section
| split-preview = section

|	{{Template parameters table row
	| <code>gordon</code>
	| A crazy guy with a crowbar in his hand.
	| split-example = section
	| split-preview = section
	}}
	
	{{Template parameters table row
	| <code>alyx</code>
	| The woman who rescued God from prison.
	}}
}}
Parameter Description Examples Preview
gordon A crazy guy with a crowbar in his hand.
alyx The woman who rescued God from prison.

				 	 

See also