--- ECHO_content/ECHO_helpers.py 2005/02/07 12:25:54 1.39 +++ ECHO_content/ECHO_helpers.py 2005/02/08 22:04:34 1.43 @@ -25,7 +25,7 @@ def content_html(self,type): obj=getattr(self,type+"_template") return obj() else: - pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_%s_template_standard.zpt'%type).__of__(self) + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','ECHO_%s_template_standard.zpt'%type)).__of__(self) pt.content_type="text/html" return pt() @@ -33,6 +33,13 @@ def content_html(self,type): class ECHO_basis: """basis eigenschaften fuer echo objekte""" + security=ClassSecurityInfo() + security.declarePublic('getImageTag') + def getImageTag(self): + """sollte uerberschrieben werden, falls von der Klasse eine imagetag zurueckkommt""" + + return "" + def showRDF(self): """showrdf""" self.REQUEST.RESPONSE.setHeader('Content-Type','text/xml') @@ -389,7 +396,8 @@ def checkOnlyOneInGroup(object): else: return object def getSubCols(self, sortfield=None, subColTypes=displayTypes, sortFieldMD=None): - + + def sort(x,y): return cmp(x[0],y[0]) @@ -421,6 +429,7 @@ def getSubCols(self, sortfield=None, sub tmplist=[] for x in ids: + if hasattr(x,sortfield): try: tmp=int(getattr(x,sortfield)) @@ -814,7 +823,9 @@ def readMetadata(url): for node in metacontent: try: #print urllib.unquote(getText(node.childNodes)),getText(node.childNodes) - metadict[re.sub('-','_',node.tagName.lower())]=urllib.unquote(getText(node.childNodes)) + #metadict[re.sub('-','_',node.tagName.lower())]=urllib.unquote(getText(node.childNodes)) + metadict[re.sub('-','_',node.tagName.lower())]=getText(node.childNodes) + except: """nothing"""