JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
sections are shown if value is set, more &refs
authorJason Woofenden <jason@jasonwoof.com>
Fri, 6 Nov 2009 17:01:55 +0000 (12:01 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Fri, 20 Nov 2009 06:25:42 +0000 (01:25 -0500)
commit144fb330586b20e38f99f1bd758fde6de8c96eca
tree59c85a03f6c7c6daa5189ae295cfd23ddca8b7e3
parente99321a886b30fc6d601c7065384bfe2a6d34bc4
sections are shown if value is set, more &refs

Previously, when deciding if a template section should be expanded/shown, this
logic was used: if($value). This does not always behave as expected. For
example if you set the value to the string "0" it will not be displayed.

With the new code, any string (including "") or integer (including 0) will
cause the template section to be displayed. To hide the section, set the value
to null or false (or unset it).

The commit after this one adds a template section argument "nonempty" which
will cause that template section not to be shown if the value is the empty
string.
template.php