Help:Template: Difference between revisions

Content deleted Content added
General: Fixed wikilink. The wililink behind "Substituting" was pointing to "Substitutionary atonement". Don't know if that was vandalism or just an accident using the article picker. It was really funny, though; I did not expect that at all.
Tags: Mobile edit Mobile web edit
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1:
{{Short description|Main technical help page on templates}}
{{Redirect-multi|2|H:T|Wikipedia:Template|help regarding tables|Help:Table|content guidelines|Wikipedia:Template namespace}}
{{For|lists of commonly used templates|WP:Template index}}
{{For-multi|lists of commonly used templates|Wikipedia:Template index|a quick introduction to templates|Help:A quick guide to templates}}
{{Redirect|H:T|help regarding tables|Help:Table}}
{{Redirect|Wikipedia:Template|content guidelines|Wikipedia:Template namespace}}
{{Pp-semi-indef}}
{{Wikipedia how to|H:T|WP:TEMPLATE}}
Line 58 ⟶ 56:
The value of a parameter can be an [[empty string]], such as when the pipe (<code>|</code>) or equals sign is followed immediately by the next pipe or the closing braces. For example, <code><nowiki>{{Template name|1=|2=test}}</nowiki></code> produces the same output as <code><nowiki>{{Template name||2=test}}</nowiki></code>. This is different from not specifying the parameter at all, which results in a default value, although templates are often coded so as to behave the same in both cases.
 
If a template call specifies a parameter which is not defined in the template, it has no effect. Editors sometime specify a parameter they know is not defined in the template, &mdash; Forfor example, editors sometimes include a parameter like {{tag|reason|open}} to add a brief explanation within the source as a [[Wikipedia:Manual of Style/Hidden text|hidden comment]]. (But some templates, such as [[Template:Requested move|Requested move]], are programmed to show the reason parameter if provided). Certain templates, especially complex ones like [[Wikipedia:Infobox|infoboxes]], may use the [[Module:Check for unknown parameters|check for unknown parameters module]] to alert editors about any [[:Category:Unknown parameters|unrecognized parameters]] to helpthey avoidcode unintentionalby errorsmistake.
 
If a parameter is specified as blank (e.g., {{para|1}}), it is treated as an empty string, which differs from leaving it out altogether (in which case the default value applies). However, templates are often coded to act the same in both cases.
 
==== Whitespace handling ====