----- Original Message ----- From: Tom Scheidt <tom@falsemirror.com> To: <zope@zope.org> Sent: Wednesday, June 21, 2000 6:35 PM Subject: [Zope] DTML-IN Question
Hi my problem is that Im setting my batch size to 3, yet I keep getting 5 items. As a matter of fact, sometimes I get 4 when asking for 2 and so on. Here's what Im using:
<snip a lot ... :)>
<dtml-in ranked_stories size=3><br> <font size=2><dtml-if headline><A HREF="/<dtml-var section>/<dtml-with daysfolder3>&dtml-id;</dtml-with>/&dtml-id;"><b><dtml-var headline></b></a></dtml-if></font> <font size=1> from <a href="/<dtml-var section>/<dtml-var subsection>/index"><i><dtml-var subsectionname></i></a></font><br> <font size=1> <dtml-if time><dtml-var time fmt=pCommonZ></dtml-if></font><br> <font size=2> <dtml-if shortstory><dtml-var shortstory></dtml-if></font> <hr size=1 width=90%> </dtml-in>
try: <dtml-in ranked_stories mapping size=3> And maybe is bettrer tu add 'start' attribute. (UNtested)
The file "ranked_stories" is a python method:
return self.selectItems( self.story_list() )
"story_list" is also a python method:
result = [] for item in self.objectValues( [ 'DTML Document' ] ): if item.hasProperty( 'publish' ): result.append( item ) return result
PM