On 23-06-2009 at 08:51:21 GRolf <ger...@pictureparking.com> wrote:

Isn't there some general switch to turn, so that PHPTal always ignores
values that are empty?

To be honest, I find
<input type="text" name="address" tal:attributes="value
customer/address|default"/>

a lot less efficient than the patTemplate syntax (which I used up to
now)
<input type="text name="address" value="{ADDRESS}">

Both have the same result ...

In standard PHPTAL you can get down to:

<input type="text" name="address" value="${address|nothing}"/>

(if you set $phptal->address)


There is a hack that makes all variables set:
http://stackoverflow.com/questions/485848/phptal-graceful-treatment-of-undefined-variables


--
regards, Kornel

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to