[Grok-dev] Re: Portlets (and maybe other skinning).

Lennart Regebro regebro at gmail.com
Tue Mar 20 02:36:29 EDT 2007

On 3/20/07, Philipp von Weitershausen <philipp at weitershausen.de> wrote:
> * Why do ViewletManager and Viewlet inherit from grok.Model? They're not
> Models nor persistent.

No good reason. (I tried something, it didn't work, forgot to change back).

> * You're registering ViewletManagers and Viewlets for None (=all
> objects) and not for context. Why?

Should I register them for context? Now I'm confused, I thought it
should be for an interface, that I could choose somehow (I haven't
done that part).

> * You're using 'main_template.pt' for the template that contains the
> macro. This is such a bad name. I can tell you've been working with the
> CMF for a loooooong time :).

Yes, I know... :-)
The idea is to make support for layers, and then look them up withing
the layers and skins and have a special marker interface to select it.

> * The "viewlets do it all" approach is certainly interesting, but it
> means that views themselves can't render whole HTML pages, only snippets
> of HTML (e.g. the contents of the <body> tag). So when megrok.viewlet is
> installed, all views would have to change (including Grok's own views
> from the admin UI, for example).

Well, the content portlet can strip out anything that is not inside
the body tag. But true, I'd like to avoid that. And also, doing that
means that without this skinning, you can put a HTML title and css and
stuff directly in the template, and with this you can't.

I have no idea of how to do layers and skinning in a way that is easy
and fast, and does not involve changing all templates. Which is why we
need to decide on a way of doing this pretty soon. The way to do it
which involves the least amount of template change is to do something
Deliverance-like. But you will still have to make the templates
conform to a standard, and I don't know how much extra processing
power something like that will need.

It would be possible to just stick all the portlets into the HTML just
before the </body> tag, but then we require you to actually use
deliverance for the design, and that's not good either.

Lennart Regebro: Zope and Plone consulting.
+33 661 58 14 64

More information about the Grok-dev mailing list