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

Tino Wildenhain tino@wildenhain.de
Sun, 10 Dec 2000 17:34:34 +0100


Hi J,


"J. Atwood" schrieb:

I think 
<dtml-with "_.whrandom.choice(folder_name.objectValues())">


</dtml-with>

should do what you want.

HTH
Tino Wildenhain
> 
> Ok.. so I can get a random item out of a folder with.
> 
> <dtml-var expr="_.whrandom.choice(folder_name.objectValues())">
> 
> And I can iterate through a folder with
> 
> <dtml-in "folder_name.objectValues()" size="1">
>         <dtml-var id>, <dtml-var title>, <dtml-var other_attribute>
> </dtml-in>
> 
> But I want to include the random statement within the <dtml-in> so I
> can get more of the object values back.
> 
> I know this must be some little ._."_.. or other such mix but I am
> getting frustrated trying.
> 
> Thanks,
> J
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> 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 )