User:OrenBochman/Conditional Tables/Test

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

given the template {{Conditional tables/example 3}}

{| class="infobox"
{{#if:{{{foo|}}}|
{{!}}-
! Foo
{{!}} {{{foo}}}
}}
{{#if:{{{bar|}}}|
{{!}}-
! Bar
{{!}} {{{bar}}}
}}
|}
Template call Result
{{Conditional tables/example 3|bar=nobar}}
Bar nobar
{{Conditional tables/example 3|foo=|bar=vbar}}
Bar vbar
{{Conditional tables/example 3|foo=value}}
Foo value
{{Conditional tables/example 3|foo=value|bar=vbar}}
Foo value
Bar vbar