[Grok-dev] Viewlet document for layouts
Lennart Regebro
regebro at gmail.com
Sat May 10 16:18:56 EDT 2008
On Sat, May 10, 2008 at 1:23 AM, Tim Terlegård
<tim.terlegard at valentinewebsystems.se> wrote:
> I've written an example application showing how viewlets can be used
> to use the same layout on all pages and how to use different stylesheets
> on different pages. It also shows how you can use grok.AddForm in a viewlet.
>
> I uploaded the application to the grokapps section in svn:
>
> http://svn.zope.org/grokapps/SimpleViewletDemo/
>
> And a how-to is written that tries to explain viewlets and the example
> application:
>
> http://grok.zope.org/documentation/how-to/using-viewlets-for-layout/view
Very nice. There is only one problem: What you actually do is that
instead of making a view for an object, you use the same "main" view,
and make the view a viewlet. This is neat, but that means that if you
want to include somebody elses modules, those views will not get the
layout.
I would in fact propose that this sort of technology becomes
"standard" in Grok, and that Normal views are in fact viewlets for the
main content. If not, the themehooks I did mean that you can impose
this exact technology on normal views.
--
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64
More information about the Grok-dev
mailing list