Glasnost

help

 

TAL Statements: attributes

tal:attributes="attribute_name expression"

The attributes statement is used to add or replace one or several attributes of an element.

tal:attributes="attribute_name1 expression1; attribute_name2 expression2"

There can't be more than one attributes statement in one element. Several attributes are separated by semi-colons in the same statement.

Example

<textarea tal:attributes="col '20'; rows '15'">blah</textarea>

becomes

<textarea col="20" rows="15">blah</textarea>
up