if

1.0 1.1 1.2 1.3

Conditional block, the syntax is very similar to the php one, allowing () || && and other php operators.

Additional Dwoo operators and their equivalent php syntax are as follow:

Examples

Example #1

index.tpl
{if 3 == 5}
  never gonna happen
{elseif 3 == 3}
  if you don't see this, the world is coming to its end
{else}
  this will never happen, unless, as previously mentionned, the world is coming to its end
{/if}

The above example will output:

if you don't see this, the world is coming to its end

Changelog

Version Description
1.2.2 Add support for XOR and ^ operators.