9 Sep
2001
9 Sep
'01
3:52 a.m.
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