Template talk:Ifdef

From The Urban Dead Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Usage

{{Ifdef|value|result}} yields result  if value  isn't blank.

This template is used to simplify the following equivalent but somewhat cryptic code variants:

{{{1{{{1|}}}|{{{2}}}}}}
{{{value{{{value|}}}|{{{result}}}}}}
{{{test{{{test|}}}|{{{then}}}}}}


Example

Code Result
1 {{Ifdef| |empty}} 1
2 {{Ifdef|x|gotcha}} 2 gotcha
3 {{Ifdef| {{{1| }}} | {{{1| }}} undefined}} 3
4 {{Ifdef| {{{1|x}}} | {{{1|x}}} for an u}} 4 x for an u
5 {{Ifdef| {{{ 1 }}} | {{{1}}} bad idea}} 5 {{{1}}} bad idea


For more info see: meta.wikimedia.org Ifdef