On 30 Sep 2010, at 10:01, Ionut Matei wrote: > Hello, > > I want the 'href' attribute to be skipped if $item['route'] is empty: > > <a tal:content="php:tm._(item['title'])" tal:attributes="href > php:ro.gen(item['route'])"/> > > the manual says attributes can be skipped with " | nothing", but this > is based on the attribute's value.
With php: modifier NULL also works: tal:attribute="href php:item['route'] ? ro.gen(item['route']) : NULL" -- regards, Kornel _______________________________________________ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal