On Oct 28, 2011, at 2:38 AM, Malthe Borch wrote: > On 27 October 2011 23:02, Mark Erbaugh <[email protected]> wrote: >> In the Zope2 Book (documentation), section 27.22.1 mentions special handling >> of the tal:condition operation when ued with the checked or selected >> attributes which makes it easier to pass an initial value to a checkbox, >> radio or select control. This behavior is not mentioned (at least I didn't >> find it) in the Chameleon 2.0 documentation, but it appears to work in my >> Pyramid / Chameleon app. > > It's available in 2.0, but not configured by default. > > It needs the following attributes set on the template class (or instance): > > literal_false = True > boolean_attributes = set(["checked", "selected", ...]) > > The combination of both gives you the ZPT behavior. > > The attributes are documented here: > > http://pagetemplates.org/docs/latest/library.html#chameleon.PageTemplate > > \malthe
Thank you. I think the reason that it worked for me without the above code is that I'm using HTML5 where the handling of checked and selected is more relaxed. Mark -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
