[Zope-CMF] Problems adding custom actions to Document
seb bacon
seb@jamkit.com
Sat, 16 Mar 2002 15:26:10 +0000
the id of an action is not the same as the presentation element (dtml
method, zpt) to which it refers.
id 'foo' might call presentation element 'view_foo'. the id -> method
translation does not occur as part of the publishing machinery, so a url
thing/foo won't work, but a url thing/view_foo will, as I think you've
found out.
the view method is hard coded in all PortalContent components. It
returns the default view, which is the action at the top of the
content's list of actions (or the first one which the user has
permission to view)
As for the error, perhaps you are getting that when you are typing
object_id/object_method/view
instead of
object_id/view
?
seb
Doyon, Jean-Francois wrote:
> 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.