Help:Template: Difference between revisions

Content deleted Content added
update links to external help pages (Meta pages have been moved/merged into MediaWiki)
Whitespace handling: link to whitespace collapsing and to section in another page describing the use of vertical display of template parameters for readability
Line 64:
==== Whitespace handling ====
 
Leading and trailing [[Wikipedia:Whitespace|whitespace]] (including line breaks) around {{em|named}} parameters and values is trimmed[[Whitespace and removedcollapsing|collapsed]] automatically, but spaces in the middle of the value are kept. For instance, <code><nowiki>{{ ... | myparam = this is a test }}</nowiki></code> has the same output as <code><nowiki>{{ ... |myparam=this is a test}}</nowiki></code>. However, with {{em|unnamed}} parameters, all whitespace is retained as preserved in the output.
 
The trimming of line breaks around parameters can be used to [[Wikipedia:Template namespace#Readability of the code|improve the readability of templates]] with many parameters, by placing each parameter in its own line.
 
==== Variable length parameter lists ====