on 1/23/01 1:12 PM, Erik Enge at [EMAIL PROTECTED] wrote:

Thanks; but being new to this could you help me a bit more by providing an
example of how to use 'getOb' within <dtml code. I tried testing in; but
couldn't get it work.

Geoff

> [[EMAIL PROTECTED]]
> 
> | 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?
> 
> Well, sometimes objectItems or objectValues can be the right ones to
> use.  Other times, (in Python Products at least) you use _getOb() to
> fetch the object for you.
> 
> Let's say you have this object structure:
> 
> /Folder1
> /Folder2
> 
> If you (in Python code) have Folder1 in the namespace, as self for
> example, you can say object=self._getOb('Folder2'), and vòila. :)
> Don't know how you would do that in DTML, though.
> 
> _______________________________________________
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to