Template:Table row if/doc
Documentation
This template either outputs the code for a table row or doesn't, based on a specified condition. If the condition evaluates to the boolean value "true", the output is a 2-column row, with a header cell ("label") in the left column and a data cell ("content") in the right column, as seen in the example below. (Note that the template outputs HTML-style table code, not wiki-style. This is because the former tends to be a little more "robust" [i.e., less error-prone] than the latter.)
The template is not intended to be used for general-purpose, arbitrary table rows. Its main purpose is to facilitate the creation of infobox templates.
Usage
{{table row if|condition|label|content}}{{table row if|content|label}}
In the first form, the table row will be output using the given label and content if only if condition evaluates to a "true" boolean value (i.e., if it contains any non-whitespace characters).
The second form is really just a shortcut where condition and content would be exactly the same — i.e., if there is any content to show, then show it in a table row, otherwise don't.
With any luck, the following example will clarify all of this.
Example
<table class="wikitable">
{{table row if|something is true|show|this content}}
{{table row if||do|nothing}}
{{table row if|there is content to show|show it with this label}}
{{table row if||nope}}
{{table row if| |neither}}
</table>
⇓
| show | this content |
|---|---|
| show it with this label | there is content to show |
As illustrated by the last template call in this example (the one with "neither"), if the first unnamed/positional parameter consists only of whitespace (in this case, a space character, but it could also be a newline or a combination of spaces and newlines), then it evaluates to "false" and the table row is not displayed.