[Zope-CMF] Re: How can override ActionsTool (practically)

Karim Yaici karimy@nipltd.com
Mon, 23 Jul 2001 16:23:28 +0100


Ok, as I could not just sit there and wait for a reply, I went into
experimenting an idea though I was not sure about it . First, I took the
ActionsTool.py (CMFCore) and created a subclass (ActionsToolSubclass), and
overrided the 'listActions' method. Do not forget to change the last line of
the code to:
InitializeClass(ActionsToolSubclass)

Now, we need to tell CMF to use this tool. The way to do it is to modify the
'tools' tuple in the CMFCore/__init__.py, by removing
'ActionsTool.ActionsTool' and replacing it with
'ActionsTool.ActionsToolSubclass'

And this worked for me (it's broken now as I was trying to subclass
MembershipTool.py as well ;-( )

Thank you all

Karim
----- Original Message -----
From: "Ausum" <augusto@artlover.com>
To: <karimy@nipltd.com>; <zope-cmf@zope.org>
Sent: Monday, July 23, 2001 4:08 PM
Subject: Re: How can override ActionsTool (practically)


> This is rigth now a concern to me, as I need to provide languange
translated
> action commands, and after finding out that some of them aren't easy
> changeable (due they're tied up to the logic behind, like the 'Edit'
> command).  The default implementation is the result of an iteration and so
> they are grouped within a single table.
>
> This is my workaround. Turn action_box skin into a variable list provider.
> Variables corresponding to those commands would allow them to be
> placed/customized at different places.
>
>
> Ausum
>
>
>
>
> Karim Yaici wrote:
> >
> > Hi,
> > Looking at the documentation, I found an article about the API
implemented
> > in CMF (portal_actions,portal_memebership...etc). There is actually a
> folder
> > called 'interfaces' (in CMFDefault) which is self-explanatory...but I
can
> > not yet figure out how to indicate to CMF to use them (__ini__.py?). I
am
> > particularly interested in modifying the links on the actions_box.
> >
> > Any help will be appreciated.
> >
> > Cheers,
> >
> > Karim
> >
> > _______________________________________________
> > Zope-CMF maillist  -  Zope-CMF@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-cmf
> >
> > See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
> requests
>