version 1.59, 2005/10/23 09:46:26
|
version 1.63, 2005/10/28 12:21:43
|
Line 1
|
Line 1
|
# Objekte zur Erzeugung von Navigationselementen |
# Objekte zur Erzeugung von Navigationselement |
|
|
from AccessControl import ClassSecurityInfo |
from AccessControl import ClassSecurityInfo |
from Globals import DTMLFile |
from Globals import DTMLFile |
from OFS.Image import Image,cookId |
from OFS.Image import Image,cookId |
Line 267 class ECHO_sqlElement(SimpleItem):
|
Line 266 class ECHO_sqlElement(SimpleItem):
|
zLOG.LOG('ECHO_Nav',zLOG.INFO,'ZSQLSimpleSearch not supported') |
zLOG.LOG('ECHO_Nav',zLOG.INFO,'ZSQLSimpleSearch not supported') |
|
|
def getNavList(self): |
def getNavList(self): |
"""ausgabe der treffer list für navigation""" |
"""ausgabe der treffer list fuer navigation""" |
|
|
|
#naechste schritte sind trial and error, warum geht mal das eine mal das andere 2.3 / 2.4 ?? |
|
|
records=self.searchQuery() |
try: |
|
try: |
|
records=self.ZSQLSimpleSearch(query=self.query) |
|
except: |
|
records=self.searchQuery(self.aq_parent,query=self.query) #python 2.4 version (??) |
|
except: |
|
records=self.searchQuery()#python 2.3 version(??) |
|
|
|
|
if not records: |
if not records: |
Line 651 class ECHO_navigation(Folder):
|
Line 658 class ECHO_navigation(Folder):
|
try: |
try: |
label=temp[x][1].getLabel() |
label=temp[x][1].getLabel() |
except: |
except: |
label=temp[x][1].label |
label=temp[x][1].label.encode('utf-8') |
else: |
else: |
label=temp[x][1].title.encode('utf-8') |
label=temp[x][1].title.encode('utf-8') |
else: |
else: |
label=temp[x][1].title.encode('utf-8') |
label=temp[x][1].title.encode('utf-8') |
|
|
|
try: |
|
label=label.encode('utf-8') |
|
except: |
|
label=label.decode('latin-1') |
|
|
if location: |
if location: |
|
|
loc=getattr(temp[x][1],'location','top') |
loc=getattr(temp[x][1],'location','top') |