Difference between revisions of "Template:TrueFalseToYesNo"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
(Created page with "<noinclude> This template converts "True" (case insenitive) to "Yes" and everything else into "No". '''NOTE:''' As any "printing" template, it doesn't change any values, but...")
 
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This template converts "True" (case insenitive) to "Yes" and everything else into "No".  
+
This template converts "True" (case insenitive) to "Yes" and everything else into "No". If the <code><nowiki>truefalse=</nowiki></code> is already "Yes", then it returns "Yes".
  
 
'''NOTE:''' As any "printing" template, it doesn't change any values, but merely returns them.
 
'''NOTE:''' As any "printing" template, it doesn't change any values, but merely returns them.
  
 
'''Parameters:'''
 
'''Parameters:'''
* <code><nowiki>truefalse=</nowiki></code> - {True, False}. The values are not case sensiste.
+
* <code><nowiki>truefalse=</nowiki></code> - {True, False}. The values are not case sensitive.
  
</noinclude><includeonly>{{#ifeq: {{lc:{{{truefalse|}}}|}}|true|Yes|No}}</includeonly>
+
</noinclude><includeonly><!--
 +
-->{{#ifeq: {{lc:{{{truefalse|}}}|}}|yes<!--
 +
-->|Yes<!--
 +
-->|{{#ifeq: {{lc:{{{truefalse|}}}|}}|true|Yes|No}}<!--
 +
-->}}<!--
 +
--></includeonly>

Revision as of 17:09, 23 December 2022

This template converts "True" (case insenitive) to "Yes" and everything else into "No". If the truefalse= is already "Yes", then it returns "Yes".

NOTE: As any "printing" template, it doesn't change any values, but merely returns them.

Parameters:

  • truefalse= - {True, False}. The values are not case sensitive.