Difference between revisions of "Template:Temp test"

From SMT: Dx2 Wiki
Jump to: navigation, search
Line 9: Line 9:
 
|}
 
|}
 
<div style="clear: both;"></div>
 
<div style="clear: both;"></div>
{| class="wikitable" align="left"
+
{| class="wikitable"
 
|+When none are passed in:
 
|+When none are passed in:
 
| valign="top" |{{Temp_test|var_x1=|var_x2=|var_x3=}}<br>
 
| valign="top" |{{Temp_test|var_x1=|var_x2=|var_x3=}}<br>
 
|}
 
|}
  
{| class="wikitable" align="left"
+
{| class="wikitable"
 
|+When any are passed in:
 
|+When any are passed in:
 
| valign="top" |{{Temp_test|var_x1=Yes|var_x2=|var_x3=}}<br>
 
| valign="top" |{{Temp_test|var_x1=Yes|var_x2=|var_x3=}}<br>
 
|}
 
|}
<br><br>
+
 
 +
<div>
 
The main factor here is the pipe within the if statement testing beyond what variable is resolved:
 
The main factor here is the pipe within the if statement testing beyond what variable is resolved:
 
<pre>{{#if: {{{var_x1|var_x2|var_x3|}}} | <tr style="color: white; background: #4b4d4f; text-align: center; font-size: 12px"><td>Something was True</td></tr> | <tr height="0">None of it was true! :D</tr>}}</pre>
 
<pre>{{#if: {{{var_x1|var_x2|var_x3|}}} | <tr style="color: white; background: #4b4d4f; text-align: center; font-size: 12px"><td>Something was True</td></tr> | <tr height="0">None of it was true! :D</tr>}}</pre>
 
+
</div>
  
 
</noinclude>
 
</noinclude>

Revision as of 22:18, 14 September 2021

Use/Examples

When passing variables.

{{Temp_test|var_x1=|var_x2=|var_x3=}}
When none are passed in:
Nothing was passed!


When any are passed in:
Yes


The main factor here is the pipe within the if statement testing beyond what variable is resolved:

{{#if: {{{var_x1|var_x2|var_x3|}}} | <tr style="color: white; background: #4b4d4f; text-align: center; font-size: 12px"><td>Something was True</td></tr> | <tr height="0">None of it was true! :D</tr>}}