Thanks!

I didn't thought that "?:" can be used in "php:".

2010/9/30 Kornel Lesiński <kor...@aardvarkmedia.co.uk>:
> 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
>

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

Reply via email to