[Zope-CMF] Re: getActionById replacement
yuppie
y.2005- at wcm-solutions.de
Tue Oct 25 10:14:54 EDT 2005
Hi Chris!
Chris Withers wrote:
> yuppie wrote:
> Okay, so how would you get the url for an action from inside a skin
> script or template?
obj.getActionInfo('object/view')['url'] for type actions or
provider.getActionInfo('user/join')['url'] for other actions.
> Just to emphasise further, I'm looking to document by way of mailing
> list archives, what the correct way to replace getActionById calls is,
> regardless of whether you're using Plone, CPS, or just plain CMF...
>
> Also, can you explain what type_info.getActionInfo('object/view')['url']
> is supposed to return?
getActionInfo() returns an ActionInfo object as defined in
interfaces.portal_actions.ActionInfo. (Note that ActionInfo and
ActionInformation are two different classes: ActionInformation is the
class of the persistent action object, not of the info dict created
based on that object.)
- url (string): URL to access the action
This is the result of the url expression in the current request context.
It is always useful if you want a link or redirect target - for
traversal use queryMethodID instead.
Please read the interfaces and grep for examples in the CMF source.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list