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.