Diff for /ECHO_content/ECHO_collection.py between versions 1.310.2.2 and 1.310.2.3

version 1.310.2.2, 2012/01/04 08:41:37 version 1.310.2.3, 2012/01/16 18:57:50
Line 1458  class ECHO_collection(CatalogAware, Fold Line 1458  class ECHO_collection(CatalogAware, Fold
           
     def showOverview(self):      def showOverview(self):
         """overview"""          """overview"""
         if 'ECHO_overview.html' in self.__dict__.keys():          # use ECHO_overview.html template in this instance
             return getattr(self,'ECHO_overview.html')()          if 'ECHO_overview.html' in self:
               return self['ECHO_overview.html']()
           
           # use ECHO_overview_main template in path
           if hasattr(self, 'ECHO_overview_main'):
               return getattr(self, 'ECHO_overview_main')()
           
           # use template from Product
         pt=zptFile(self, 'zpt/ECHO_content_overview.zpt')          pt=zptFile(self, 'zpt/ECHO_content_overview.zpt')
         return pt()          return pt()
   
Line 1468  class ECHO_collection(CatalogAware, Fold Line 1475  class ECHO_collection(CatalogAware, Fold
     def index_html(self):      def index_html(self):
         """standard page"""          """standard page"""
         if self.ZCacheable_isCachingEnabled():          if self.ZCacheable_isCachingEnabled():
               
             result = self.ZCacheable_get()              result = self.ZCacheable_get()
             if result is not None:              if result is not None:
                 # Got a cached value.                  # Got a cached value.
                 return result                  return result
                   
         if 'index.html' in self.__dict__.keys():          # old Zope 2.9 method
             ret=getattr(self,'index.html')()          #if 'index.html' in self.__dict__.keys():
           #    ret=getattr(self,'index.html')()
   
           # use Zope 2.12 IContainer for child access
           if 'index.html' in self:
               # use index.html template if it exists
               ret = self['index.html']()
                   
         elif 'overview' in self.__dict__.keys():          elif 'overview' in self:
               # use red-rectangle template when there's an 'overview'
             ret=self.showOverview()              ret=self.showOverview()
   
           # use getattr for acquisition
         elif hasattr(self,'collection_index_template'):          elif hasattr(self,'collection_index_template'):
               # use 'collection_index_template' in acquisition path
             ret=self.collection_index_template()                  ret=self.collection_index_template()    
         elif hasattr(self,'main_index_template'):  
   
           elif hasattr(self,'main_index_template'):
               # use 'main_index_template' in acquisition path
             ret=self.main_index_template.__of__(self)(self.main_template)              ret=self.main_index_template.__of__(self)(self.main_template)
               
         else:          else:
               # use template from Product
             pt=zptFile(self, 'zpt/ECHO_main_index_template_standard.zpt')              pt=zptFile(self, 'zpt/ECHO_main_index_template_standard.zpt')
             pt.content_type="text/html"              pt.content_type="text/html"
             ret=pt.render()              ret=pt.render()

Removed from v.1.310.2.2  
changed lines
  Added in v.1.310.2.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>