> If I remember well, there's a tal:on-error attribute to catch exceptions: > > http://phptal.motion-twin.com/manual/en/#tal-on-error >
If I change play.html to [code] <html tal:on-error="string:variables not defined here"> <body> <span tal:content="name|default">name</span> <span tal:content="age">age</span> </body> </html> [/code] the output will be : [code] variables not defined here [/code] But I hope to get: [code] <html> <body> <span>name</span> <span></span> </body> </html> [/code] In general, I hope to handle the situation when a variable is not defined, *EVERY* undefined variable will be replaced by a empty string or something else. Kornel Lesinski suggest to implement a custom attribute like phptal:errors="ignore", it seems can work. Regards, Zou guangxian _______________________________________________ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal