At 5:01 PM -0700 11/30/05, Duncan McGreggor wrote:
z3 utilizes a component-based approach - both in the way that it was built and in the way that applications are built using it. To "get a hold" of certain components, you use various useful functions that are provided in the zapi (many of which come from the components package). One of the most common ways of getting a hold of an object or object type is by interface lookup.

Ok, suppose there is a ZPT Page object located in the ZMI/ZODB in the following folder path:


To "get ahold" of the object from within that I mean bind a variable name to an say I should use an interface lookup. I don't get it. I've seen how to validate whether an object implements an interface, or whether an interfaces is providedBy an object, but I don't know how to lookup an object via an interface.

In the case of a ZPT, it implements a lot of different interfaces :

Which one would I pick to use for a lookup? And if I picked the right one, wouldn't I get back a list of objects, rather than the specific one I want?

I guess I'm asking if there is a function that will allow me to do this:

introText = getObject ('/SiteName/UserContent/Articles/IntroText')

From there, I'd expect to be able to rename the object, move it to a different directory, delete it, copy it, put it inside another object, change attributes, call methods on it, etc.

Am I misguided in wanting this? I am just wondering how to get at user generated data, manipulate it, export it, etc. I've seen how to get at objects in the ZODB via TALES expressions, but all I can with that is display it, right?

Zope3-users mailing list

Reply via email to