Actions

Developer Area/Coding guidelines/TPL files

From Mahara Wiki

< Developer Area‎ | Coding guidelines
Revision as of 12:30, 7 September 2015 by Sonn (talk | contribs) (Created page with "Misuse of the function empty() in the template files will cause errors. See more {http://www.smarty.net/forums/viewtopic.php?p=31665&sid=e4101928d307dbc8cac3041e2ae25d0f} Wro...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Misuse of the function empty() in the template files will cause errors. See more {http://www.smarty.net/forums/viewtopic.php?p=31665&sid=e4101928d307dbc8cac3041e2ae25d0f}

Wrong:

{if empty($artefacts)}
...
{/if}

Good:

{if !$artefacts}
...
{/if}