[Zope-CMF] Problems adding custom actions to Document

Doyon, Jean-Francois Jean-Francois.Doyon@CCRS.NRCan.gc.ca
Fri, 15 Mar 2002 18:13:31 -0500


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