{else:} – adds an PHP else in an if block


Usage ( {else:} )


adds an else statement in PHP so that blocks of conditional HTML are shown correctly.


Setting variables for if


class example {
    function output() {
        $this->showStuff = false;

Else in template



Compiled template

<?php if ($t->showStuff)  { ?>Hello<?php } else { ?>World<<?php } ?>

The output

closes an if or foreach block (Previous) configures automatic form elements (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.