Emile van Sebille
> Thanks Philipp. That answers one of the questions. Can you tell me
how
> to acquire a reference to a folder given that I've got my hands on
> context and can import Zope, etc?
>
I found a post in the archives from Martijn Pieters that put me on the
right track so I've got something that works for me:
from Products.ExternalMethod.ExternalMethod import ExternalMethod
def addExternalMethod(self, id, title, module, function, REQUEST=None):
"""Add an external method to a folder"""
id=str(id)
title=str(title)
module=str(module)
function=str(function)
i=ExternalMethod(id,title,module,function)
self._setObject(id,i)
def initialize(context):
"""Initialize"""
addExternalMethod(context._ProductContext__app, "id", "title",
"module", "func")
--
Emile van Sebille
[EMAIL PROTECTED]
---------
_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )