On 27 October 2011 23:02, Mark Erbaugh <m...@microenh.com> 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

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to