Stephan Richter wrote:

On Sunday 09 April 2006 20:33, David Pratt wrote:
The Z2 integration will be started soon at a sprint soon. Viewlets and
portlets seem pretty synonymous and cpsskins provides a way to
manipulate portlets visually which is very nice.

Viewlets are not portlets! Portlets are much more restrictive and the industry has a very specific meaning for the term, which differs from both, Plone's and CPS skins', usage of the term.

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."""


   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.

Zope3-users mailing list

Reply via email to