[Zope] presenting a list of stuff [2]
   
    Casey Duncan
     
    cduncan@kaivo.com
       
    Mon, 16 Apr 2001 09:07:39 -0600
    
    
  
Sven Fischer wrote:
> 
> hello (again),
> 
> i want to display rows of content with alterning colors (one white row, one
> grey row) but my content isn't always there (i have an if around those tr
> tags) :
> 
> ItemA (grey)
> ItemB (white)
> ItemD (grey)
> ItemE (white)
> 
> ItemC is empty
> 
> i thin i have to look at item_sequence, but since it's not really a sequence
> (just stuff (text properties) that i want to make look like one) it doesn't
> work out of the box.
> 
> maybe assigning a variable at the begining and counting the loops (ugly, i
> might as well code this in asp ;-)
> 
> ? any ideas ?
> 
> $ven
> 
In python, filter(list) will return the list with any false items
removed. Make a simple external method to do this. I don't think
filter() is available in TTW Python scripts, but I could be wrong.
def filterList(list):
    return filter(list)
-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>