[Zope3-Users] suppress menu item with zcml?

Dylan Reinhardt dylanreinhardt at gmail.com
Thu Jun 23 12:25:29 EDT 2005


On 6/23/05, Jim Fulton <jim at zope.com> wrote:
> Dylan Reinhardt wrote:
> > When my content interface *inherits* from an interface, this seems to
> > work... but when my class *implements* an interface, this appears not
> > to.
> 
> I don't know what you mean.

Perhaps I'm not using the correct terminology.  :-)

Here are the two cases:

Case 1 ("implements"):
----------
 I have a ZCML directive such as this:

----
  <content class=".mycode.MyClass">
    <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
	/>
    <!--much snipped-->
  </content>
----


    
Case 2 ("inherits").
-----------
 I use the following in my interface definition:

----
   from something.interfaces import ISomeBase

   class IMyClass(ISomeBase):
       """ this interface inherits from another one """
----

In case 2, I'm able to use the menuitem ZCML directive to suppress a
menu that's defined by ISomeBase.  All good.

In case 1, I can't find a way to suppress the display of the Metadata
tab.... at least not without resorting to a custom template or
wrapping/modifying built-in code.  This *seems* like a task for ZCML,
yes?

Does that help clarify the problem I'm seeing?

Thanks,

Dylan


More information about the Zope3-users mailing list