[Zope] dtml-if and dtml-with problems
James Sintz
jsintz@ohiohistory.org
Thu, 16 Nov 2000 12:54:21 -0500
Thanks!!!!
that did the trick...
<dtml-if "_.str(nl_goLiveDate) == ZopeTime().strftime('%Y/%m/%d')">
also found out that
<dtml-if "nl_goLiveDate.strftime('%Y/%m/%d') ==
ZopeTime().strftime('%Y/%m/%d')">
works as well.
> -----Original Message-----
> From: Andy McKay [SMTP:andym@ActiveState.com]
> Sent: Thursday, November 16, 2000 12:45 PM
> To: James Sintz; zope@zope.org
> Subject: Re: [Zope] dtml-if and dtml-with problems
>
> 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 )
> >