[Zope] RE: Random choice in <dtml-in>?

J. Atwood jatwood@bwanazulia.com
Thu, 7 Dec 2000 12:18:16 -0500


I just love answering my own questions (maybe it is from the 
embarrassment of having to ask them).

Here is the code that works like a charm:

<dtml-with expr="_.whrandom.choice(folder_name.objectValues())">
	<dtml-var "folder_name.attribute_name">
	and
	<dtml-var id>
</dtml-with>

Thanks to Andy McKay for posting this in November.

I added a tip to Zope.org at 
http://www.zope.org/Members/BwanaZulia/random_items

J