Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

pypm install megrok.menu

How to install megrok.menu

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install megrok.menu
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.4 Available View build log
Windows (64-bit)
0.4 Available View build log
Mac OS X (10.5+)
0.4 Available View build log
Linux (32-bit)
0.4 Available View build log
Linux (64-bit)
0.4 Available View build log
Lastest release
version 0.4 on Jan 5th, 2011

This package allows you to register browser menus and menu items for browser views in Grok.

A menu is easily registered by creating a subclass of megrok.menu.Menu:

System Message: WARNING/2 (<string>, line 6)

Literal block expected; none found.

import megrok.menu.Menu

class Tabs(megrok.menu.Menu): grok.name('tabs') grok.title('Tabs') grok.description('')

A view can then placed on a menu with the menuitem directive:

System Message: WARNING/2 (<string>, line 15)

Literal block expected; none found.

class Edit(grok.View): grok.title('Edit') grok.description("Change this object's data.") megrok.menu.menuitem('tabs')


The title and description directives used here specifie the menu item's label and description. The menuitem directive takes at least one argument, the menu that the item is registered to be for. This can either be an identifier string or the menu class itself. Other optional parameters include icon, filter, order and extra.

For more use cases and examples, take a look to tests/test_functional.py


0.4 (2010-03-06)
  • Cleaned the tests module. Now, we only use the ZTK packages to test.
  • The dependencies have been cleared. We no longer depend on zope.app

System Message: WARNING/2 (<string>, line 41)

Bullet list ends without a blank line; unexpected unindent.


  • Updated the security grokking in the menu items grokker. We don't

System Message: WARNING/2 (<string>, line 44)

Bullet list ends without a blank line; unexpected unindent.

need the protect_getattr, as the view security grokker already does it for us.

  • Fixed the dependencies in the package requires. All dependencies are

System Message: WARNING/2 (<string>, line 48)

Bullet list ends without a blank line; unexpected unindent.

now clearly declared.

  • Added a LICENSE.txt file for the ZPL 2.1.
0.3 (2009-11-02)
  • Added the support of the grokcore.viewlet 'order' directive to

System Message: WARNING/2 (<string>, line 57)

Bullet list ends without a blank line; unexpected unindent.

reorder the menu items and sub menus. This permits to have a baseclass defining the basic menu and to keep the ordering possibility in the sublasses. We probably should do that for the different arguments of the menuitem directive. That would allow more genericity and reusability. Note : this change is 100% backward compatible. Simply added tests to show the behavior. [trollfot]

  • Get rid of the grok dependency. Now depends only on grokcore.* packages
  • Updated the build process
0.2 (2009-03-02)
  • Compatible with grok1.0a1
  • Add the SubMenuItem base class and it's grokker SubMenuItemGrokker
  • Add the extra parameter to the menuitem directive
  • Tests for added functionality
  • Remove version.cfg
0.1 (2008-07-12)

Initial release.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.