[Zope] dtml-if and dtml-with problems

Andy McKay andym@ActiveState.com
Thu, 16 Nov 2000 09:45:04 -0800


If your nl_goLiveDate is a date, then you might need to str() the variable
<dtml-if "_.str(nl_goLiveDate)=='2000/11/16'">

--
  Andy McKay, Developer.
  ActiveState.

----- Original Message -----
From: "James Sintz" <jsintz@ohiohistory.org>
To: <zope@zope.org>
Sent: Thursday, November 16, 2000 9:13 AM
Subject: [Zope] dtml-if and dtml-with problems


> Could someone tell me why the follow statement is never true.
>
> <dtml-in "news.objectValues(['newsLetters'])" sort="nl_goLiveDate">
>  <dtml-if "nl_goLiveDate == '2000/11/16'">
>    <h2><dtml-var nl_subject> - <dtml-var nl_goLiveDate></h2>
>    <p>
>     <dtml-var nl_body fmt=structured-text>
>    </p>
>  </dtml-if>
> </dtml-in>
>
> The news folder contains several newsletters and one of them DOES have a
> 'nl_goLiveDate' of 2000/11/16 yet the above express seems to be always
> false. What obvious mistake am I making?
>
> Ideally I would like the page to show only the newsletter that has the
same
> date as today's date.
>
> Jamey
>
> _______________________________________________
> 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 )
>