[Zope] Basic DTML syntax question- variable value test
Charlie Reiman
creiman@kefta.com
Thu, 14 Nov 2002 16:54:58 -0800
It looks good but maybe you should try this:
<dtml-if "str(AppRecDate)=='1900/01/01'">
You might also want to try evaluating
<dtml-var "AppRecDate">
to see what python (not DTML) thinks the value of the object is.
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Kelley, Sean
> Sent: Thursday, November 14, 2002 4:23 PM
> To: 'zope@zope.org'
> Subject: [Zope] Basic DTML syntax question- variable value test
>
>
> I am trying to test the value of a variable and do something if
> it is true.
>
> When I say:
>
> <dtml-if "AppRecDate == '1900/01/01'">
> <input type="text" name="AppRecDate"
> size="12"
> value="" tabindex="13">
> <dtml-else>
> <input type="text" name="AppRecDate"
> size="12"
> value="<dtml-var AppDelDate>" tabindex="13">
> </dtml-if>
>
> I get the false condition. That is, value="<dtml-var AppDelDate>" is used
> in the input statement.
>
> If I output the value of the variable directly, I get that it is equal to
> "1900/01/01" with the following code:
> <dtml-var AppDelDate>
>
> What am I missing in my use of the syntax?
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>