Re: [Zope] defining counters in zope(newbie)

2000-05-29 Thread Chris McDonough

Sudhir,

Hi...

It's natural to want to do this in DTML... but probably not the best
idea.  I know it's a lot to chew to have to use Python to do stuff like
this (you don't), but it would make your life probably a lot easier to
do this in an external method or a Python method.

That said (untested),




   

  
   
  
  
  
  

   

 
I feel dirty now.

Sudhir Kumar wrote:
> 
> How do I keep track of counter in Zope.
> 
> For example, if I want to produce the following output:
> 
> 1.book1Author1
> 2.book2
> 3.book3
> 4.book4Author2
> 5.book5
> 6.book6
> 7.book7Author3
> 
> i.e. book1, book2, book3 are by Author1, etc.
> 
> I need something like the following
> ...
> count = 0   <---intended
> 
> 
> 
>   
>   sequence-item  author>
>   
>   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]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] defining counters in zope(newbie)

2000-05-29 Thread Sudhir Kumar

How do I keep track of counter in Zope.

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

1.book1Author1
2.book2
3.book3
4.book4Author2
5.book5
6.book6
7.book7Author3

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


I need something like the following
...
count = 0   <---intended



  
  sequence-item 
  
  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]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )