[Grok-dev] Alternative Layout System in Grok with z3c.template/z3c.pagelet

Christian Klinger cklinger at novareto.de
Thu Mar 19 06:32:50 EDT 2009


> I understand the problem, now. Using the View grokker, the template
> validation fails because of the provided render method.
> Even more, the Pagelet does provide the IGrokView interface from
> grokcore.view, not grok, so no application_url nor flash.
> Though, these methods are needed in case of grok app devs. It's really
> too bad that there no grokcore.view.View mixin nor grok.View one, to
> allow the reusability of these methods and save some code duplication.

yes you are right in your point of view. I had a look to the 
implementation of grokcore.viewlet it´s the same in this module. The
namespace, default_namespace, and __init__ are nearly the same as in 

For the megrok.pagelet.Pagelet i will implement the interface form grok
and not grokcore.View so we should have the application_url and flash.

Thanks again for your feedback

> 2009/3/18 Souheil CHELFOUH <trollfot at gmail.com>:
>> As far as I can see, Pagelets are Views with a different __call__
>> method that looks for the layout.
>> I also see that you entirely recoded the grokker for that component.
>> Wouldn't that be smart to make a megrok.pagelet.Pagelet  inherit from
>> grok.View as a baseclass, and simply redefine the __call__ method and
>> the namespace (if needed) ?
>> Here, using a brand new component will make it hardly maintainable, as
>> it already lacks 'flash' and 'application_url' from the IGrokView.
>> 2009/3/18 Jan Ulrich Hasecke <juhasecke at googlemail.com>:
>>> Am 18.03.2009 um 10:12 schrieb Christian Klinger:
>>>> This is a short summary what?s the current status of
>>>> megrok.pagelt:
>>> Is there any example code. I would like to play around and need a
>>> kick-start.
>>> juh
>>> _______________________________________________
>>> Grok-dev mailing list
>>> Grok-dev at zope.org
>>> http://mail.zope.org/mailman/listinfo/grok-dev

More information about the Grok-dev mailing list