vlibTemplate

vLib Logo

5.7. <TMPL_UNLESS name='BOOL'>

This tag is the opposite of <TMPL_IF>. The block is output if the CONTROL_PARAMETER is set to false or not defined. You can use <TMPL_ELSE> and <TMPL_ELSEIF> with <TMPL_UNLESS> just as you can with <TMPL_IF>, however there is no <TMPL_ELSEUNLESS> tag.



Example

  <TMPL_UNLESS BOOL>

    Some text that is output only if BOOL is FALSE.

  <TMPL_ELSE>

    Some text that is output only if BOOL is TRUE.

  </TMPL_UNLESS>


If the name of a TMPL_LOOP is used in a TMPL_UNLESS, the UNLESS block is output if the loop has zero rows. Please see the OPTION section regarding <TMPL_IF/UNLESS> statements within loops.



Example

  <TMPL_UNLESS LOOP_ONE>

    This will output if the loop is empty.

  </TMPL_UNLESS>