[ZPT] Boolean values and state
Scott Burton
mrzope@hotmail.com
Sat, 01 Dec 2001 01:09:59 +0000
I am not sure if anyone has noticed it. But if you want to evaluate
something in a ZPT and change an checkbox attribute to the checked state.
All you have to do is declare a global variable with a condition. For
instance: <tal:block condition="exists:request/SiteCookie"
tal:define="global return_visitor python:1" /> Then in the checkbox input
type tag you would put: <input tal:attributes="checked return_visitor"
type="radio" name="customer_type" value="return_cust"> and it will render
<input type="radio" name="customer_type" value="return_customer" checked> if
true. If there is no return_visitor it will not give you an error, it will
just not render the checked state. Very handy indeed!
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp