----- Original Message -----
From: Tom Scheidt <[EMAIL PROTECTED]>
> result = []
> for item in self.objectValues( [ 'DTML Document' ] ):
>     if item.hasProperty( 'publish' ):
> (and if there is something entered in the 'publish' field)
>        result.append( item )
> return result

If you just meant, is the value of the 'publish' property is "true"
(nonblank string, nonzero int, etc.) then you want:

result = []
for item in self.objectValues( [ 'DTML Document' ] ):
    if item.hasProperty( 'publish' ) and item.publish:
       result.append( item )
return result

Cheers,

Evan @ digicool & 4-am



_______________________________________________
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 )

Reply via email to