Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
144fb33
)
added tem_auto_nonempty()
author
Jason Woofenden
<jason@jasonwoof.com>
Fri, 20 Nov 2009 06:24:31 +0000
(
01:24
-0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Fri, 20 Nov 2009 06:34:58 +0000
(
01:34
-0500)
template.php
patch
|
blob
|
history
diff --git
a/template.php
b/template.php
index
9a512a6
..
396819d
100644
(file)
--- 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'.