[Cubicweb] cubicweb.web.views.basetemplates.HTMLPageHeader

Carlos Balderas carlos.balderas at gmail.com
Mon Jul 6 16:53:52 CEST 2009


Salut,

I am trying to modify the HTMLPageHeader of the main template but I am
getting an error:

(cubicweb.registry) ERROR: select ambiguity, args:
(<cubicweb.etwist.request.CubicWebTwistedRequestAdapter object at
0xb3e3d4c>, None)
kwargs: ['w', 'view'] ["<class
'cubicweb.web.views.basetemplates.HTMLPageHeader'>", "<class
'cubes.alltests.views.maintemplates.MyHTMLPageHeader'>"]

what I am doing is just trying to remove the login of this section :

#####################################################################################
from cubicweb.web.views.basetemplates import HTMLPageHeader

class MyHTMLPageHeader(HTMLPageHeader):

    def main_header(self, view):
        """build the top menu with authentification info and the rql box"""
        self.w(u'<table id="header"><tr>\n')
        self.w(u'<td id="firstcolumn">')
        self.vreg.select_component('logo', self.req,
self.rset).dispatch(w=self.w)
        self.w(u'</td>\n')
        # appliname and breadcrumbs
        self.w(u'<td id="headtext">')
        comp = self.vreg.select_component('appliname', self.req, self.rset)
        if comp and comp.propval('visible'):
            comp.dispatch(w=self.w)
        comp = self.vreg.select_component('breadcrumbs', self.req,
self.rset, view=view)
        if comp and comp.propval('visible'):
            comp.dispatch(w=self.w, view=view)
        self.w(u'</td>')

        # logged user and help
        #self.w(u'<td>\n')
        #comp = self.vreg.select_component('loggeduserlink', self.req,
self.rset)
        #comp.dispatch(w=self.w)
        #self.w(u'</td><td>')

        # search box
        self.w(u'<td>')
        self.get_searchbox(view, 'left')
        self.w(u'</td>')

        self.w(u'<td>')
        helpcomp = self.vreg.select_component('help', self.req, self.rset)
        if helpcomp: # may not be available if Card is not defined in the
schema
            helpcomp.dispatch(w=self.w)
        self.w(u'</td>')
        # lastcolumn
        self.w(u'<td id="lastcolumn">')
        self.w(u'</td>\n')
        self.w(u'</tr></table>\n')
        self.template('logform', rset=self.rset, id='popupLoginBox',
klass='hidden',
                      title=False, message=False)
##############################################################################3

CubicWeb version: 3.3.2
Detected mode: installed

Any help or suggestion to solve this question will be very appreciated.

Merci Beaucoup
Carlos Balderas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20090706/318e40d7/attachment-0186.html>


More information about the Cubicweb mailing list