[Zope] Help with expr
Eric Walstad
eric@walstads.net
Thu, 09 Aug 2001 12:53:32 -0700
Hi Todd,
I've never tried to use a limit (yet) but the dtml-in syntax includes an
'end=n' (<dtml-in get_story end=5>) parameter that may do what you want (I'm
not sure what it does :). If that doesn't work, check out the Zope Book
for details on DTML in.
Also, if your "get_story" list is generated from a SQL, it will likely be
more efficient to let the SQL call limit the results so that Zope doesn't
have to.
HTH,
Eric.
> Also is their a way to limit this to just show the first 5.
>
> Todd
> At 12:06 PM 8/9/2001 -0700, you wrote:
> >Hi Todd,
> >My guess is that you code is doing string comparisons rather
> than ZopeTime
> >comparisons. It might work if you remove the .strftime() method from the
> >logic portions.
> >Eric.
> >
> > > <dtml-in get_story>
> > > <dtml-if expr="ZopeTime(end) > ZopeTime() and
> > > ZopeTime(start) <= ZopeTime()">
> > > <dtml-var title>
> > > </dtml-if>
> > > </dtml-in>