I m working with viewlets. My idea is to override the default plone site with my things like my own logo, my menus, my address bar ,etc. I used the default viewlet code in to my own createPictMenu.py file. The code which is in brundelre3/eggs/plone.app.layout-2.3.4-py2.7.egg/plone/app/layout/viewlets/common.py ->class LogoViewlet(ViewletBase):
My createPictMenu.py looks like this
class bdrMenuView(LogoViewlet):
template = ViewPageTemplateFile('templates/main_page.pt')
def __init__(self, context, request, view, manager=None):
super(ViewletBase, self).__init__(context, request)
self.__parent__ = view
self.context = context
self.request = request
self.view = view
self.manager = manager
def main_page(self):
return self.template()
Here LogoViewlet is the class which i inherit from common.py which is under eggs folder. It successfully replaces the plone.logo with my menus. I saw it under localhost:8086/brundelre3/@@manage-viewlets
But when i run my project localhost:8086/brundelre3/main_page.html its showing error
Error Message :
2013-08-14 11:18:19 ERROR Zope.SiteErrorLog 1376459299.050.254417887359 http://localhost:8086
/brundelre3/main_page.html
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.BaseRequest, line 501, in traverse
Module ZPublisher.BaseRequest, line 346, in traverseName
Module ZPublisher.BaseRequest, line 116, in publishTraverse
Module zope.component._api, line 120, in queryMultiAdapter
Module zope.component.registry, line 238, in queryMultiAdapter
Module zope.interface.adapter, line 532, in queryMultiAdapter
TypeError: __init__() takes at least 4 arguments (3 given)
Can anyone tell whats wrong with this code?