[Zope] Help! whrandom.choice
Phillip J. Eby
pje@telecommunity.com
Tue, 21 Dec 1999 22:01:59 -0500
At 07:43 PM 12/21/99 -0500, technews@egsx.com wrote:
>
><dtml-if "diduknow.objectValues(['DTML Document'])">
> <!--#var expr="_.whrandom.choice(diduknow.objectValues(['DTML
>Document']))"-->
></dtml-if>
Try:
<!--#var expr="_.whrandom.choice(diduknow.objectValues(['DTML
Document']))(_.None,_)"-->
The problem is that you're getting a DTML Document as the result of an
expression. But then it's being converted to a string instead of being
called to produce its output. Adding the (_.None,_) will call the DTML
document and pass in the current namespace.