[Zope] how-to generate a DTMLMethod from a random zClass in a Folder???

Trevor Toenjes zope@toenjes.com
Sat, 8 Sep 2001 23:52:09 -0400


Q:  I want to generate the DTMLMethod "foo" from a randomly selected zClass
in the Folder "bar".

As a newbie to developing and to Zope, I have hit a wall with this one...
So far, I have randomly generated images, and randomly generated ID's for
cookies...but the same approach does not seem to be working on zclass
methods.

If this helps, I can generate a DTMLmethod using...
<dtml-with bar>
  <dtml-with azClassID>
    <dtml-var foo>
  </dtml-with>
</dtml-with>

i stopped here...
<dtml-var expr="_.random.choice(bar.objectValues('id').foo)">

Would it work better if "foo" was a DTMLDocument?
I cant find any reference to something like this, so maybe this will become
my first how-to.
Thanks for the help,
-Trevor