[Checkins] SVN: z3c.menu.ready2go/trunk/src/z3c/menu/ready2go/zcml.py Make sure that the directives accept an arbitrary amount of arguments.

Stephan Richter srichter at cosmos.phy.tufts.edu
Sun Oct 19 03:15:27 EDT 2008


Log message for revision 92365:
  Make sure that the directives accept an arbitrary amount of arguments.
  

Changed:
  U   z3c.menu.ready2go/trunk/src/z3c/menu/ready2go/zcml.py

-=-
Modified: z3c.menu.ready2go/trunk/src/z3c/menu/ready2go/zcml.py
===================================================================
--- z3c.menu.ready2go/trunk/src/z3c/menu/ready2go/zcml.py	2008-10-18 17:49:42 UTC (rev 92364)
+++ z3c.menu.ready2go/trunk/src/z3c/menu/ready2go/zcml.py	2008-10-19 07:15:25 UTC (rev 92365)
@@ -87,8 +87,11 @@
         title=u"I18n title",
         description=u"Translatable title for a viewlet.",
         required=False)
-    
 
+# Arbitrary keys and values are allowed to be passed to the menu item.
+IMenuItemDirective.setTaggedValue('keyword_arguments', True)
+
+
 # menuItem directive
 def menuItemDirective(
     _context, name, permission, for_=zope.interface.Interface,
@@ -99,10 +102,10 @@
 
     # Security map dictionary
     required = {}
-    
+
     if title is not None:
         # set i18n aware title
-        kwargs['i18nTitle'] = title 
+        kwargs['i18nTitle'] = title
 
     # Get the permission; mainly to correctly handle CheckerPublic.
     permission = viewmeta._handle_permission(_context, permission)



More information about the Checkins mailing list