How one does attributes which may or may not exist? Exampls are checkbox checked=”checked” or disabled=”disabled” HTML attributes.
What kind of tal:attributes expression is involved?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When an attribute listed in
tal:attributesis set to None, the attribute is omitted:The same applies to a path expression to a non-existing object:
Now the
titleattribute will only be set if there is a title key or attribute on item. Note that ifitem/titleresolves toNone, the attribute is omitted as well.From the TALES 1.4 specification,
attributessection:Where python
Noneis interpreted as “nothing”.