X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=template.php;h=396819d20d4ad2db754eaa5815690d66c45c5754;hb=bd1f2c2ee4f8edf6139b811ec3fe746700409723;hp=9a512a6326b19c90d00d04cd7ae7dc8821bb02bf;hpb=144fb330586b20e38f99f1bd758fde6de8c96eca;p=wfpl.git diff --git a/template.php b/template.php index 9a512a6..396819d 100644 --- a/template.php +++ b/template.php @@ -325,6 +325,14 @@ function tem_auto_show(&$value) { return $value; } +# 'nonempty' sections will not be shown if the corresponding data +# value is the empty string + +function tem_auto_nonempty(&$value) { + if($value === '') $value = null; + return $value; +} + # 'evenodd' sections are given an 'evenodd' attribute whose value # alternates between 'even' and 'odd'.