[Grok-dev] Re: Site design questions.
Philipp von Weitershausen
philipp at weitershausen.de
Mon Feb 5 13:31:59 EST 2007
Lennart Regebro wrote:
> But how to do templating? There was a definite lack of calling
> main_template in the grok-templates, but somehow, somewhere, the rest
> of the site design needs to be pushed out as well. What are the
> grokish plans for that?
Well, first of all, you can use PageTemplates macros like in Zope (more
like in Zope 2 than in Zope 3, actually).
One way to do it would be:
1. make layout.py with the following lines:
import grok
from zope.interface import Interface
grok.context(Interface) # register stuff for all objects
2. make a layout_templates directory
3. inside that directory create layout.pt and let it define a macro.
4. use the macro using the following TALES expression:
context/@@layout/<macroname>
> Also, some sort of portlets system would be needed. Does anything
> (except the overworked and presumably now dead cpsskins for zope3)
> exist?
I suppose something that makes working with ContentProviders easier and
easily grokkable would ansewr this need. I'm not sure this has to be
part of grok. This could also easily be an extension (megrok.viewlets or
whatever).
> Ntw, I'm planning to use Deliverance to make the actual design. My
> current home-pages design still is up to snuff after what must be 5
> years now, but of course it's not in any format easy to transpose to
> any modernity, so Deliverance should be a good solution. That means
> all the "main template" needs to do is to push out the portlets and
> the content with appropriate tags. But I still don't know how to do
> it.
Well, you could experiment with a viewlet mechanism for grok as
suggested above. Any input would be highly appreciated!
--
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5
More information about the Grok-dev
mailing list