Minecraft Wiki
Advertisement
[view | edit | history | purge]Documentation
This is a user namespace meta template 
This template should not be used in templates. If the use of this template is needed, leave a message on the talk page so it can be moved to the template namespace.

This template is used to preserve whitespace independently of #if:, #switch:, or #ifeq:.

Parameters[]

The parameter {{{p}}} can be set to choose which parameter to output. The parameter {{{#}}} can be set to choose a output if the parameter does not exist.

Other parameters can be set to decide results. If a parameter is equal to the name of another set parameter, it will output the other parameter, otherwise it will simply output itself.

If there is no parameter with the name specified, it will return the parameter with the name set by {{{#}}}. If there is no parameter with the name specified by {{{#}}}, it will simply output {{{#}}}.

Preserve whitespace[]

The primary purpose is independent of any parser. Note that to preserve whitespace, you must redirect a result to a nameless parameter.

"{{#switch:two|one= 1st |two= 2nd |three= 3rd |four= 4th }}"
Produces

"2nd"

While
"{{User:KnightMiner/Sandbox/p+|p=two|one=1|two=2|three=3|four=4| 1st | 2nd | 3rd | 4th }}"
Produces

" 2nd "


Trim whitespace[]

This template can simply trim whitespace.

"{{User:KnightMiner/Sandbox/p+|#= One }}"
Produces

"One"

See also[]

[view | edit | history | purge]The above documentation is transcluded from User:KnightMiner/Sandbox/p+/doc.
Advertisement