Casey Duncan Wrote:
Solution: write a wrapper method in your class that looks for a DTML method to index against. If it finds one then call it or a default DTML method passing self as the client like so:
defaultSearchTextWeighted = Globals.HTMLFile('dtml/searchTextWeighted', globals()) def searchText(self): """Look for a DTML Method to call""" if hasattr(self, 'searchTextWeighted'): stw = self.searchTextWeighted else: stw = self.defaultSearchTextWeighted return stw(self)
Forgive my ignorance here, but this will evaluate/render the method (using the correct context of the class instance itself), and proxy the rendered method to the catalog machinery because it is a python class, post-rendered? Or is it that this wrapper returns the DTML method itself, wrapped in a correct context by which catalog renders the method? Sean