[Zope] Can't get simple count to work.

Ignacio Valdes ivaldes@hal-pc.org
Fri, 24 Nov 2000 13:55:58 -0600


Hello all,

I have a Squishdot site at http://www.linuxmednews.com that I've
successfully been able to make a page that has a one line link of all
the articles that have appeared on the site. Unfortunately, the number
has grown to a few hundred and I need to make it display n lines at a
time as well as count them so I can keep track. I am trying to use the
following code to display them with a count, but I've tried just about
everything and spent hours on this 'simple' task, but can't get it to
work. This is as close as I could get only it numbers the articles that
appeared on a particular day, then jumps to the next day that articles
where posted. i.e. not a smooth 1 to n count.  You can see what it does
at: http://www.linuxmednews.com/linuxmednews/display_old_articles Could
anyone have a look?

-- IV

<dtml-let currtime="ZopeTime()">
<dtml-in "_.range(1,all_cnt)" >
  <dtml-if "date_list(_['sequence-item'])">
    <dtml-let num1="_['sequence-index']">
    <dtml-call "REQUEST.set('article_found',1)" >
    <dtml-in "date_list(_['sequence-item'])" >
      <BR> <dtml-var "num1">
<IMG SRC="<dtml-var SCRIPT_NAME >/<dtml-var icon url_quote>" BORDER="0">

      <A href="<dtml-var site_url >/<dtml-var id
url_quote>/index_html"><dtml-var title></A>&nbsp;
      <dtml-if reply_cnt>(<dtml-var reply_cnt>)</dtml-if> by <dtml-var
author><FONT size=2> on <dtml-var date_posted>

    </dtml-in>
    </dtml-let>
  </dtml-if>
</dtml-in>
</dtml-let>