[Zope-CMF] Problems adding custom actions to Document
Doyon, Jean-Francois
Jean-Francois.Doyon@CCRS.NRCan.gc.ca
Fri, 15 Mar 2002 18:21:29 -0500
Me again :)
OK, so my understanding of the actions was a bit misguided, I noticed =
my
action appearing the in the Actions Box, and now I get it ..
So now that I've figured this out I'm curious ... where does the /view =
come
from ? I allways thought it was a way to call the action associated =
with the
object, since Documents have an action with id "view" ... But I guess =
that's
not it ?
If not, what is this /view and what are it's uses and implications ? I
noticed in the some cases I get errors such as:
Error Type: RuntimeError
Error Value: function attributes not accessible in restricted mode
when I append /view to a document ... I got rid of that by simply NOT =
using
/view :) But I'd still like to understand it !
Thanks a bunch,
j.F.
-----Original Message-----
From: Doyon, Jean-Francois =
[mailto:Jean-Francois.Doyon@CCRS.NRCan.gc.ca]
Sent: Friday, March 15, 2002 6:14 PM
To: 'zope-cmf@zope.org'
Subject: [Zope-CMF] Problems adding custom actions to Document
Hello,
I've run into this problem before, but never found the solution, so =
here it
goes ...
I'm trying to add a custom action to Document ... something that will =
allow
me to view the document without the header and footer.
so I created the DTML Method, then went into the portal_types, and =
added the
action as such:
, { 'id' : 'notemplateview'
, 'name' : 'no Template =
View'
, 'action' :
'notemplate_document_view'
, 'permissions' : (=20
CMFCorePermissions.View, )
}
(I even, as part of trying to get this working, edited Document.py, but =
that
didn't help)
The problem is that when I try to view this with a URL such as:
http://mydomain.com/cmfsite/portalfolder/document/notemplateview
I get a cannot locate object error. /view works fine for instance, =
just not
the one I created.
It works if I use document/notemplate_document_view however ...
what am I missing here?
Thanks,
Jean-Fran=E7ois Doyon
Internet Service Development and Systems Support
GeoAccess Division
Canadian Center for Remote Sensing
Natural Resources Canada
http://atlas.gc.ca
Phone: (613) 992-4902
Fax: (613) 947-2410
_______________________________________________
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