On Mon, 14 Apr 2008 11:02:09 +0100, Nestor A. Diaz <[EMAIL PROTECTED]> wrote:

Hello, i have the same bug/problem when dealing with semicolons in tal:attributes.


Does anybody can provide some hints on how to fix it ?

<td
    tal:repeat="data person"
    tal:content="data"
tal:attributes="style php: repeat.person.odd ? 'background: #eee;' : false"
/>

tal:attributes expects multiple attributes separated by semicolon, so semicolon in #eee; accidentally ends the style attribute.

To prevent that you should use double semicolon:

tal:attributes="style php: repeat.person.odd ? 'background: #eee;;' : false"

but it seems that PHPTAL fails to change double semicolon to single one. I'll try to fix this, but I think the proper solution is to use class name instead of hard-coded style:

<td tal:attributes="class php:repeat.person.odd ? 'odd' : NULL">

--
regards, Kornel

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

Reply via email to