How to I use aquisition in an external method?
I want to find out if a callable object exists from a folder object using acquisition. ie if I call folder.method() it will be guaranteed to work.
Dylan, I usually pass "this()" in to an external method to get a handle on acquisition from an external method. e.g.: <dtml-call "emMyExternalMethod(this())"> def myExternalMethod(context): if context.folder.attribute: do something else: do something else this() generally refers to the folder containing the dtml method. in the external method, you can use acquisition through this object. HTH, Chris "Jay, Dylan" wrote:
I want to find out if a callable object exists from a folder object using acquisition. ie if I call folder.method() it will be guaranteed to work.
_______________________________________________ Zope maillist - Zope@zope.org 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 )
-- Chris McDonough Digital Creations, Inc. Zope - http://www.zope.org
participants (2)
-
Chris McDonough -
Jay, Dylan