RE: [Zope] Help with expr
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>
participants (1)
-
Eric Walstad