[Grok-dev] Update on megrok.pagelet...

Christian Klinger cklinger at novareto.de
Thu Feb 5 10:53:22 EST 2009


Hello Grok-Developers,

as some of you know i worked during the last days on
a grok *support* for z3c.pagelet. With the help of z3c.pagelet
  it?s possible to create very flexible layouts. [2]
z3c.pagelet has a strong dependency to z3c.template.
This means grokking z3c.pagelet is one part of the story
the other part is z3c.template. [3]

We had already a short discussion about this topic on the
*grokkerdam sprint* and on the grok-devel mailinglist [1].

Ok so what i have done so far:

I created a megrok.pagelet addon with two new Grokkers.

1. megrok.pagelet.LayoutView
    this grokker allows us to specify a common Layout for our
    grok application. It?s possible to register Layouts for
    different contexts und different layouts.

2. megrok.pagelet.Pagelet
    a Pagelet is similar to a grok.View. Unlike grok.View a Pagelet
    does not render only the "Page" on it?s call method, the
    Pagelet renders the page into the specified Layout.

    I think it?s possible to change the grokcore.view.View that it
    works like a normal grok.View if no Layout is found for the context
    of the View. If a Layout is found it should be possible to render
    the View in the specified Layout.


I have created a sample application which show?s some of the 
functionality of the megrok.pagelet add on. There are also some
basic examples of z3c.form integation with megrok.pagelet and 
megrok.z3cform in the example application.

You can find the buildout of the example app here [4].

** Please note that there is a custom layer for the example app.
    So call http://localhost:8080/++skin++myskin/YourApp/ **


Maybe you find some time to take a look on it.

I?m sure thats not perfect but it could be a good starting
point for further investigations.


Please give some feedback.

Thanks for your help.

- Christian

[1] http://article.gmane.org/gmane.comp.web.zope.grok.devel/6893/
[2] http://pypi.python.org/pypi/z3c.pagelet/1.0.2
[3] http://pypi.python.org/pypi/z3c.template/1.1.0
[4] http://svn.zope.org/Sandbox/cklinger/example/trunk/

P.S. Unfortunatly the example app has some fixed path information so you
have to adjust these in zope.conf to get the things running...



More information about the Grok-dev mailing list