[Zope] checking variables

Michel Pelletier michel@digicool.com
Wed, 4 Aug 1999 12:22:22 -0400


> -----Original Message-----
> From: Sean Robertson [mailto:seanr@infi.net]
> Sent: Wednesday, August 04, 1999 12:11 PM
> To: zope@zope.org
> Subject: [Zope] checking variables
> 
> 
> I am trying to check for the existance of a variable that is 
> passed in the
> URL.  The statement is as follows:
> 
>     <!--#if cconnect==true-->
>         (code block one)
>     <!--#else cconnect==true-->
>         (code block two)
>     <!--#/if cconnect==true-->
> 

You are using the python expression syntax, thus your expression must be
quoted:

<!--#if "cconnect==true"-->
...

Note that you must have an object called true also.  If you want to know
if the cconnect request attribute is equal to the *string* 'true' you
must say:

<!--#if "cconnect=='true'"-->

-Michel