[Zope] objectValues(meta_type) in python script
24 Oct 2001 12:48:08 +0200
ons, 2001-10-24 kl. 12:39 skrev Gitte Wange:
> I am in the process of optimizing some of my scripts and moving some
> code from dtml methods into python Scripts.
> I am trying to find an object in a folder.
> I know there is only one object with this metatype ('MMM Shop Shopping
> Cart') in the folder.
> But this doesn't work:
> for item in memberfolder.objectValues('MMM Shop Shopping Cart'):
> shopping_cart = context.getId()
> return shopping_cart
> Now I expected to recieve a string containing 'Shopping Cart', but I
> recieved a string containing 'CD001' which is a product, not a shopping
> Doesn't objectValues() work in python scripts ?
I just discovered that context.getId() returns the id of the object I
"stand on" (the object that is in the URL).
So perhaps it works .. I just need to call something else than
How do I get hold of the objects that objectValues() returns ?