JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
added tem_auto_nonempty()
authorJason Woofenden <jason@jasonwoof.com>
Fri, 20 Nov 2009 06:24:31 +0000 (01:24 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Fri, 20 Nov 2009 06:34:58 +0000 (01:34 -0500)
template.php

index 9a512a6..396819d 100644 (file)
@@ -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'.