Am Montag, 16. Juli 2007 22:44 schrieb Stephan Richter: > On Monday 16 July 2007 15:58, Benji York wrote: > > This reminds me of something I've been curious about but haven't had > > time to research lately. What are the differences between pagelets and > > viewlets and their various strengths/weaknesses. An acceptable answer > > is "read the docs and decide for yourself". <wink> > > Viewlets-pure UI design is a great approach, if you have portal, where > there is really never a main content area, since you can reuse viewlets > accross many pages. So in this UI pattern, you would create a "Contents" > viewlet manager, and register viewlets for this manager. Depending on which > page you are looking at, viewlets are picked up and displayed. > Unfortunately, for simple pages, this requires two directives: One to > define the page and one to define its "Contents" viewlet. This cost is very > acceptable to a portal site where those simple pages are rare, but are > impractical for more traditional Web applications. > > Also, any piece of dynamic code is a viewlet manager with viewlets or a > simple content provider: left menu, right menu, header, CSS files, JS > files, title, etc. > > Pagelet-based UI design is pretty much the same pattern, except that it > allows you to define a main content area. Here you define a layout template > that is used to define the O-wrap (pretty much like standard_macros/page). > A page is then registered as a pagelet, which defines a second template > that defines the content area of the page. As for macros, the advantage > here is that you only need one generic UI layout directive plus one other > directive per page. But something that is much nicer in pagelets is that > you do not have to include the macro from within the pagelet, but that the > layout is driving everything. Also, it is much simpler to register an > alternative layout template for a particular view or context.
That leads me to the question if it's possible to mix pagelets/viewlets? In my case, I have one main content area but I have some dynamic code, e.g. a navigation box, a login box, later perhaps a search box etc. How would I implement them? Perhaps I use a viewlet manager / viewlet in the layout template? Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users