Maybe not via a string but being able to pass attributes using an array with the keys being attribute names would be handy.


On 13-Mar-2010, at 4:12, Christina Van Dyke <crvand...@gmail.com> wrote:

I know you can assign attributes to a tag by doing this: <div tal:attributes="class string:myclass; id string:myid;">text</div>

What I want to do is pass a variable to the template that contains all the attributes in one string. Example:

$my_attributes = "class string:myclass; id string:myid;";

<div tal:attributes="my_attributes">text</div>

This doesn't work. Anyone know why, or have a workaround?

Thanks,
Christina

_______________________________________________
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