[Grok-dev] Grok Menu
Martijn Faassen
faassen at startifact.com
Fri Nov 20 15:35:53 EST 2009
Hey,
Souheil CHELFOUH wrote:
> I'm brainstorming since Cologne Sprint about the menu feature.
> Currently, i'm using megrok.menu, but it doesn't quite do what I want.
> I also had a look at z3c.menu.simple, but, it's not flexible enough.
> I'd like to know what are people's usecases and start something new.
>
> Ideally, a menu item could be anything. A view, a viewlet or anything else.
> Right now, I ran into problem with megrok.menu, since the grokker is
> registered for grok.View and I want non-grok.View components in my
> menu.
> I don't really know what would be the best implementation and the most
> flexible one.
>
> What about a class decorator that could register the component somehow ?
I think at this stage we'd still look at grokkers for this, as that's
how we register things in general. We'll likely turn to class decorators
(at least optionally) for Martian directives at some point, but Grok's
general idea is to do registration at a defined time that's not import-time.
That said, one idea is to extend Martian so it can grok things based on
the presence of interface declarations on the class instead of just base
classes. That might be useful here, perhaps.
> I need help, conceptually, on this one.
> Anyone's out there to provide a helping hand ? :)
You have a lot more experience doing menus with Grok than I have. I can
only be of conceptual help if you come up with a bit of material for me
to work with. And I'm quite interested in helping you make progress on this.
It'd help me if you could sketch out how megrok.menu and z3c.menu.simple
don't quite do what you want, and what your use cases are.
What would it mean to turn, say, a viewlet or a model into a menu item?
Regards,
Martijn
More information about the Grok-dev
mailing list