How do I keep track of counter in Zope.

For example, if I want to produce the following output:

1.    book1            Author1
2.    book2
3.    book3
4.    book4            Author2
5.    book5
6.    book6
7.    book7            Author3

i.e. book1, book2, book3 are by Author1, etc.

I need something like the following
    count = 0   <-------------------------------intended
    <dtml-in   "AuthorList()">
            <dtml-let   author="sequence-item">
            <dtml-in  "BookList(author)">
                  <dtml-if "sequence-index==0">
                         <dtml-var count> sequence-item <dtml-var
                         <dtml-var count> sequence-item
                  count=count+1   <---------------------- intended

I do not know how to set count=0, count=count+1 in dtml.
Any help will be greatly appreciated.

Thank you,
-- sudhir

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to