Difference between revisions of "Template:T row if"

From Conservapedia
Jump to navigation Jump to search
(Fix bug)
(Edits to documentation)
Line 8: Line 8:
 
  {{parm|2|Second column text|yes|}}
 
  {{parm|2|Second column text|yes|}}
 
}}
 
}}
−
If parameter 2 is not empty, then the code for a table row (wiki syntax) with two columns is returned, else nothing is returned.
+
If parameter 2 is not empty, then the code for a table row (wiki syntax) with two columns is returned, else nothing* is returned.
  
−
Example:
+
'''Example:'''
  
 
<pre><nowiki>{| class="wikitable"
 
<pre><nowiki>{| class="wikitable"
Line 16: Line 16:
 
  {{t row if|Not Provided:|{{{no|}}}}}
 
  {{t row if|Not Provided:|{{{no|}}}}}
 
|}</nowiki></pre>
 
|}</nowiki></pre>
−
Displays as:
+
'''Displays as:'''
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 22: Line 22:
 
  {{t row if|Not Provided:|{{{no|}}}}}
 
  {{t row if|Not Provided:|{{{no|}}}}}
 
|}
 
|}
 +
 +
<small>*&mdash; A couple of empty <nowiki><div></nowiki> tags are actually returned, to avoid bugs.</small>
 
</noinclude>
 
</noinclude>

Revision as of 07:31, June 16, 2007


Template: T row if
Use on Templates
Use for Conditional table row
Category template applies to page (none)
Template Parameters
(See using templates).
Name Purpose Required? Comment
1 First column text yes
2 Second column text yes

If parameter 2 is not empty, then the code for a table row (wiki syntax) with two columns is returned, else nothing* is returned.

Example:

{| class="wikitable"
 {{t row if|Provided:|{{{yes|yes}}}}}
 {{t row if|Not Provided:|{{{no|}}}}}
|}

Displays as:

Provided: yes

*— A couple of empty <div> tags are actually returned, to avoid bugs.