20 Sep
2005
20 Sep
'05
4:07 a.m.
Hi!
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>. Lg, AXEL. -- Gentoo? Debian? RedHat? SuSE? *BSD? Stop the distri-war, make little user!