That's an invalid "tales" syntax. The correct expression following the ZPT
specs should be:
tal:attributes="value firstname | nothing"
Where "nothing" is evaluated as a tales keyword which returns an empty
I haven't used PHPTAL in a while and I can't remember if the "nothing"
keyword was supported in later versions. If not, an alternative is to use
tal:attributes="value firstname | ''"
* Note two consecutive single quotes after the pipe, to indicate an empty
On Fri, Aug 7, 2009 at 3:32 PM, Guillaume Lecanu <guilla...@lya.fr> wrote:
> Hi everybody,
> I use this syntax :
> <input name="firstname" value="" tal:attributes="value firstname|" />
> Note the pipe character at the end of the expression.
> So, if the firstname value exists, this show it and if the value is not
> set, this return an empty string.
> It's perfect for me, but I just want to be sure if this syntax is good and
> will not be deprecated in future.
> PHPTAL mailing list
PHPTAL mailing list