[Zope-CMF] actions by id - please advice
Alan Runyan
runyaga@runyaga.com
Sat, 12 Jan 2002 20:05:33 -0600
Hi.
my skin selectively picks out actions from the actions tool. since all the
users actions are not displayed -- what is the best way to approach this?
I have a script called getActionUrlById - I pass in the actions, and the id
and it returns me the url for that action. is this appropriate? it would
be
nice if the action tool maybe had something that did this. I know what set
of actions (either workflow, object, or users) and I know the id.
I do this alot. If I did this, lets say. 10 times per page -- is this a
enormous performance drag? heres the script
##parameters=action_id, actions
##title=given object actions and a action_id return the url
for action in actions:
if action.get('id', None)==action_id \
or action.get('name', '').lower()==action_id:
return action['url']
another problem. it appears that the id's for actions change from CMF
version to CMF verison. these should be documented and stay the same.
all CMF versions should have a action set that needs to be documented. it
keeps changing: login, or log in.
~runyaga