From PortlandWiki
Jump to: navigation, search
[edit] [history] [purge] 50px Template documentation
Similar templates at English sister projects
25px Meta Void
25px Wikipedia Void
25px Commons Void
25px Wikibooks Void
25px Wikinews void
25px Wikispecies Void
25px Wikiversity Void

This template returns the empty string.


Parser functions for branching (#if, #ifeq, #ifexpr, #ifexist, #iferror, #switch) trim the result. To be able to specify a result starting and/or ending with newlines and/or spaces, the possible results specified in the call of such a branching function (then-part, else-part, switch values) are template names, and the parser function call forms the title part inside a pair of double braces. Unnamed parameters in this outer call are not trimmed. If there is a then-part but no else-part, or in the case of #switch without default, the corresponding template name has to return the empty string regardless of any parameters specified in the call. This is achieved by using this template.

The template is used in:


It is also possible to use parser function {{ns:0}} (the empty string for the main namespace). However, any parameters of {{ns:0}} contribute to the post-expand include size, while this is not the case with this template.

{{{{#if..:..|a|void}}|b}} is equivalent with {{{{#if..:..|a|p2}}|b|}} provided that {{a|b}} is equivalent with {{a|b|}}, e.g. because template A does not use a parameter 2, or because it treats empty and undefined the same.


  • "{{void}}" → "" [1].
  • "{{void|p}}" → "" [2].
  • {{tt|void}} using Template:Tt containing "{{{{{1}}}|a{{{2}}}b{{{2}}}c{{{2}}}d}}" gives "".


  • "{{ns:0}}" → "" [3].
  • "{{ns:0|p}}" → "" [4].
  • {{tt|ns:0}} gives "".


The template can be used for adding comments in the wiktext, without affecting the rendering. In the usual way it can be controlled whether on substitution of a template containing a call of void it is substituted (i.e., the comment is removed) or not. See also Help:Substitution#Multilevel substitution and Help:Comment tags#Substitution.

See also

The above documentation is transcluded from Template:Void/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Please add categories and interwikis to the /doc subpage. Subpages of this template.