[Framework-Team] Viewlets

Martin Aspeli optilude at gmx.net
Fri Apr 7 22:53:27 UTC 2006

Hi guys,

I'm thinking about several things I'd like to enable in Plone 3.0, and the  
concept of using viewlets is really attractive. For example, the  
contentmenu (the green one, with actions and state and add item): It's  
impossible to add a new drop-down without overriding the entire thing. In  
general, this could be solved by having the whole menu be rendered as a  
viewlet manager, with each menu provided by a viewlet. You could then  
register new viewlets to get new menus.

I've only read through the READMEs of zope.contentprovider  
and zope.viewlet  
and probably should do so again.

I wanted to ask, though, if any of you have got some experience with  
viewlets and would like to discuss it further? In particular, we need to  
work out whether we could:

  - use them in 3.0  directly (unlikely, since it requires a provides: TAL  
namespace, which probably requires the Zope 3.x TAL implementation that  
may or may not land in Zope 2.10)

  - use them via some additional magic (e.g. a global python object that  
could act as the provides: expression in a regular tal:content)

  - use its interfaces and implement our own rendering cycle via views (the  
update cycle is probably less important for the time being).

I think we need to discuss this, because it'd be a shame to put off  
features in 3.0 because Zope 2 wasn't ready (especially if we weren't sure  
when it would be ready) to use viewlets, but also a shame to re-invent a  
similar architecture to get the features in time. I'm hoping to find some  
middle ground where we're reasonably forward-compatible, even if it means  
we only support a subset of the viewlet features for now.



More information about the Framework-Team mailing list