|
Re: Re: [z3-five] zope.viewlet and zope.contentprovider - options for Zope : msg#00058web.zope.z3base.five
Stephan Richter wrote: On Sunday 09 April 2006 20:33, David Pratt wrote: Actually I've looked into creating a generic "viewlet" portlet that would make it possible to reuse viewlets in cpsskins (for instance by using the visual portlet editor). A feature that is missing is that there is no easy way to find the list of registered viewlets. A viewlet lookup mechanism would be needed, for instance a utility that returns a list vocabulary items with viewlet's name and the factory. also something that seems strange is that some viewlets are dependent on viewlet managers: see for instance: zope/app/boston/viewlets/toolbar: class ToolBarViewlet(object): """I18n info viewlet.""" implements(IToolBarViewlet) def macros(self, name): return self.manager.macros(name) <<<<<<<<<< def menus(self, menuId): return getMenu(menuId, self.context, self.request) So if I want to render a toolbar viewlet I need to instanciate the corresponding viewlet manager. I would understand this if I wanted to render all viewlets in a given area of the page, but if I want to render just one viewlet? Basically it introduces a cycle in the design: viewlet managers depend on viewlets and viewlets depend on viewlet managers to be rendered. /JM |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: [z3-five] zope.viewlet and zope.contentprovider - options for Zope 2 and Plone 3: 00058, Stephan Richter |
|---|---|
| Next by Date: | Re: zope.viewlet and zope.contentprovider - options for Zope 2 and Plone 3: 00058, Andreas Jung |
| Previous by Thread: | Re: Re: [z3-five] zope.viewlet and zope.contentprovider - options for Zope 2 and Plone 3i: 00058, Stephan Richter |
| Next by Thread: | Re: [Plone-developers] Re: Re: [z3-five] zope.viewlet and zope.contentprovider - options for Zope 2 and Plone 3: 00058, Stephan Richter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |