[Zope] DTML-IN Question

Tom Scheidt Tom Scheidt" <tom@falsemirror.com
Wed, 21 Jun 2000 12:35:17 -0400


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:

<dtml-call "REQUEST.set('day3', ZopeTime().Day())">
<dtml-if "day2 == 'Monday'"><dtml-call "REQUEST.set('daysfolder3',
cindycity)"></dtml-if>
<dtml-if "day2 == 'Tuesday'"><dtml-call "REQUEST.set('daysfolder3',
techbytes)"></dtml-if>
<dtml-if "day2== 'Wednesday'"><dtml-call "REQUEST.set('daysfolder3',
techbytes)"></dtml-if>
<dtml-if "day2== 'Thursday'"><dtml-call "REQUEST.set('daysfolder3',
cindycity)"></dtml-if>
<dtml-if "day2 == 'Friday'"><dtml-call "REQUEST.set('daysfolder3',
techbytes)"></dtml-if>
<dtml-if "day2 == 'Saturday'"><dtml-call "REQUEST.set('daysfolder3',
techbytes)"></dtml-if>
<dtml-if "day2 == 'Sunday'"><dtml-call "REQUEST.set('daysfolder3',
behindscenes)"></dtml-if>
<dtml-if daysfolder3>
<dtml-with news88><dtml-with daysfolder3>
<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>&nbsp;&nbsp;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>
</dtml-with>
</dtml-with>
</dtml-if>

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

Thanks in advance.
Tom Scheidt   |   www.falsemirror.com   |   tom@falsemirror.com
----------------------------------------------------------------------------
-----------