[PHPTAL] tal:attributes and php:
Wallace McGee
wallace at petrosys.com.au
Thu Feb 28 00:03:42 CET 2008
Hi ppl, my first post on the mailing list.
Its always useful setting attributes with tal:attribute but I have yet
to work out how to include a semi-colon in the attribute value (useful
for setting onclick javascript code etc..)
<span tal:attributes = " class php:'message'; my_element php:'green' "
>This works</span>
<span tal:attributes = " class php:'message'; my_element
php:'green;black' " >This does not work</span>
I have tried escaping the ; in the string but that broke phptal.
I tried doubling the ; and I ended up with my_element="green;;black"
Any suggestions?
The same goes for how to get double quotes in to a string (again for
adding javascript):
<span tal:attributes = " class php:'message'; my_element
php:'green="black"' " >This does not work</span>
More information about the PHPTAL
mailing list