X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=template.php;fp=template.php;h=90a253347f79af16fbfe5a8777764af17e7664cd;hb=e8eec562c1b6d3420c3d035c9abdd1303cfbba23;hp=87305ce5ff6b8356f6fd361b9be728d4988eb04a;hpb=46b55cc36d0767571ec0ae49e243ecc3bf7d127f;p=wfpl.git diff --git a/template.php b/template.php index 87305ce..90a2533 100644 --- a/template.php +++ b/template.php @@ -331,6 +331,17 @@ function tem_auto_nonempty(&$value) { return $value; } +# 'not' sections will not be shown if the corresponding data +# value is not set (opposite of default) +function tem_auto_unset(&$value) { + if($value === null) { + $value = ''; + } else { + $value = null; + } + return $value; +} + # 'evenodd' sections are given an 'evenodd' attribute whose value # alternates between 'even' and 'odd'. function tem_auto_evenodd(&$values) {