diff --git a/browser/configure.zcml b/browser/configure.zcml index 9f9b759..4b92714 100644 --- a/browser/configure.zcml +++ b/browser/configure.zcml @@ -5,7 +5,39 @@ xmlns="http://namespaces.zope.org/browser" i18n_domain="zope" > + + + + + + + + diff --git a/configure.zcml b/configure.zcml index be9c44a..8c0c4be 100644 --- a/configure.zcml +++ b/configure.zcml @@ -5,11 +5,33 @@ i18n_domain="zope" > - - - + + + + + + + + + + + + + + + diff --git a/interfaces.py b/interfaces.py index ffaafe0..f910d4f 100644 --- a/interfaces.py +++ b/interfaces.py @@ -24,6 +24,7 @@ $Id$ from zope.interface import Interface from zope.app.container.interfaces import IOrderedContainer +from zope.app.component.interfaces.registration import IRegisterable from zope.schema import Text, TextLine, List, Object, Int @@ -32,6 +33,12 @@ class IBaseMenuItem(IOrderedContainer): """ Base interface with common methods for IMenu and IMenuItem. """ + title = TextLine( + title=u'Title', + description=u'Title of the menu or text that will appear on the menu item', + default=u'', + required=True) + def getMenuItems(): """ Return sub-menu items contained in this menu or menu item. """ @@ -59,7 +66,7 @@ class IBaseMenuItem(IOrderedContainer): """ -class IMenu(IBaseMenuItem): +class IMenu(IBaseMenuItem, IRegisterable): """ A Menu is a container for MenuItems and will be shown in a menu portlet. """ @@ -88,6 +95,16 @@ class IMenuItem(IBaseMenuItem): with other MenuItem objects in a menu portlet. """ + target = Object(Interface, + title=u'Target', + description=u'Target object this menu item should link to.',) + + urlPath = TextLine( + title=u'URL or Path', + description=u'URL or path that this menu item should link to.', + default=u'', + required=True) + def getItemUrl(): """ Return the target URL of this menu item. """