ons, 2001-10-24 kl. 12:39 skrev Gitte Wange:
Hello,
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 cart.
Doesn't objectValues() work in python scripts ?
ARG !!! 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 context.getId() .. But what? How do I get hold of the objects that objectValues() returns ? TIA, Gitte Wange