> Say I have a function that I want to make callable in
> my UI. It needs to be globally available, i.e. it needs to
> be callable *without* having an instance of my product yet.
> (This has to do with listing information about all acquirable
> instances of the product, so the user can choose from those
> available.)

In a Product's __init__.py:

def theSecret(self):
        return "A hobbit!"
methods = {
        'whatIsFrodo':  theSecret

Save that i.E. in MyInstance/Products/MyFancy/__init__.py, restart Zope
And than <dtml-var whatIsFrodo>. 

Gentoo? Debian? RedHat? SuSE? *BSD? Stop the distri-war, make little user!

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to