[Zope] Looking up object instances in a folder

Marius Kjeldahl marius@funcom.com
Sun, 19 Mar 2000 13:16:20 +0100


I have some instances of my own ZClass in a folder, and I can iterate
over them using:

<dtml-in "somefolder.subfolder.objectValues()">
  <dtml-var title>
</dtml>

The instances are stored using auto generated ids (simple numbers).

In addition to being able to iterate over the instances in the folder, I
also need to access an instance directly by using its id which is passed
in the REQUEST object, but so far I have been unsuccessful. What I am
trying to do is something like:

<dtml-in "somefolder.subfolder.getInstance(REQUEST.id)">
  <dtml-var title>
</dtml-in>

but I have not been able to get access to just the one instance (but
iterating works fine as mentioned before). Could somebody with a clue
give me a hint?

Thanks in advance,

Marius Kjeldahl