[Zope] Getting an object from it's id

Gale geofstro@monaco.mc
Tue, 23 Jan 2001 11:56:57 +0000


Hi,

This is obviously a newbie question.

I have several places in my dtml code where in order to obtain an object I
loop through objects of that kind and make a test to determine if each
objects id matches the id I picked up from a form.

This is the only way I could get it to work; but I feel there must be a
better, more efficient way.

Here is an example:

<dtml-in expr="objectValues('Folder')">
<dtml-if "myId==id">

Once I get a match I then proceed to use it in subsequent code, such as a
<dtml with id> and it works since id now refers to the object I'm interested
in.

Is there a Zope API method that will allow me to get an object from it's id,
or can I write a simple Python method to do it, or am I missing something
even more obvious?

Thanks


Geoff Armstrong