--- MPIWGWeb/Attic/MPIWGHelper.py 2008/08/28 18:20:09 1.1.2.6 +++ MPIWGWeb/Attic/MPIWGHelper.py 2008/10/23 07:53:50 1.1.2.7 @@ -18,6 +18,15 @@ def getTextFromNode(nodename): rc = rc + node.data return rc +def getTemplate(self, tpName): + """get a template file either form the instance or from the product""" + ext=self.ZopeFind(self.aq_parent,obj_ids=[tpName]) + if ext: + pt = getattr(self,ext[0][1].getId()) + else: + pt=PageTemplateFile(os.path.join(package_home(globals()), 'zpt/'+tpName)).__of__(self) + assert(pt) + return pt def sortStopWordsF(self,xo,yo): if not hasattr(self,'_v_stopWords'):