[Zope] Random images--but with a caveat

Chris Muldrow cmuldrow@fredericksburg.com
Fri, 21 Jun 2002 16:46:10 -0400

I'm trying to do random image generation on our site, and I've found lots of
messages that suggest using whrandom inside a DTML tag like so:

<dtml-var expr="_.whrandom.choice(objectValues('Image'))">
Or code to that effect...
But here's my catch: I need to check the image that is returned randomly for
a Cutline property. If the property is not there, I need to kick that image
out and randomly grab another that does have a Cutline. I'm thinking a
Python Script would be better suited for this, but I can't seem to get the
syntax to work out the way it should. Any ideas?
Thanks! - Chris
Cmuldrow @ fredericksburg.com