|
|
| version 1.6, 2004/10/01 16:44:36 | version 1.7, 2004/10/01 17:55:20 |
|---|---|
| Line 9 from Globals import package_home | Line 9 from Globals import package_home |
| def getTemplate(self, tpName): | def getTemplate(self, tpName): |
| """get a template file either form the instance or from the product""" | """get a template file either form the instance or from the product""" |
| print "getting ", tpName | |
| ext=self.ZopeFind(self.aq_parent,obj_ids=[tpName]) | ext=self.ZopeFind(self.aq_parent,obj_ids=[tpName]) |
| if ext: | if ext: |
| return getattr(self,ext[0][1].getId()) | print " internal:", ext |
| pt = getattr(self,ext[0][1].getId()) | |
| else: | |
| pt=PageTemplateFile(os.path.join(package_home(globals()), 'zpt/'+tpName)).__of__(self) | pt=PageTemplateFile(os.path.join(package_home(globals()), 'zpt/'+tpName)).__of__(self) |
| print " external:", pt | |
| assert(pt) | |
| return pt | return pt |
| class MPIWGStaff(ZSQLExtendFolder): | class MPIWGStaff(ZSQLExtendFolder): |
| Line 40 class MPIWGStaff(ZSQLExtendFolder): | Line 43 class MPIWGStaff(ZSQLExtendFolder): |
| def publications_full(self): | def publications_full(self): |
| """show publication""" | """show publication""" |
| pt=getTemplate(self, "publications_full") | pt=getTemplate(self, "publications_full_main") |
| return pt() | return pt() |
| def talks_full(self): | def talks_full(self): |
| """show talks""" | """show talks""" |
| pt=getTemplate(self, 'talks_full') | pt=getTemplate(self, 'talks_full_main') |
| return pt() | return pt() |
| def teaching_full(self): | def teaching_full(self): |
| """show talks""" | """show talks""" |
| pt=getTemplate(self, 'teaching_full') | pt=getTemplate(self, 'teaching_full_main') |
| return pt() | return pt() |
| def changeMPIWGStaffForm(self): | def changeMPIWGStaffForm(self): |