provide facility to override main header components without having to override the whole methode stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 31 Aug 2009 09:57:27 +0200
branchstable
changeset 3053 51f196c212d9
parent 3049 cb13d9b6c29e
child 3054 8b3b243e308e
provide facility to override main header components without having to override the whole methode
web/views/basetemplates.py
--- a/web/views/basetemplates.py	Fri Aug 28 14:15:18 2009 +0200
+++ b/web/views/basetemplates.py	Mon Aug 31 09:57:27 2009 +0200
@@ -315,6 +315,7 @@
 class HTMLPageHeader(View):
     """default html page header"""
     id = 'header'
+    main_cell_components = ('appliname', 'breadcrumbs')
 
     def call(self, view, **kwargs):
         self.main_header(view)
@@ -336,7 +337,7 @@
         self.w(u'</td>\n')
         # appliname and breadcrumbs
         self.w(u'<td id="headtext">')
-        for cid in ('appliname', 'breadcrumbs'):
+        for cid in self.main_cell_components:
             comp = self.vreg['components'].select_vobject(
                 cid, self.req, rset=self.rset)
             if comp: