[Zope-CMF] TTW Actions Forthcoming

Kari-Hans Kommonen khk@uiah.fi
Sat, 5 Jan 2002 11:28:24 +0200


Thank you, sounds very helpful!

How about multiple languages and other UI customization needs?

Would it be possible to apply the Expression also to the title item - 
so that the title could depend on a function which could select the 
actual text based on a user's chosen language or style or whatever UI 
preference?

...or is there some other future localization strategy that comes to help?


kari-hans

-----

At 11:43 -0500 3.1.2002, Andrew Sawyers wrote:
...
>in the method.  Now, tools store a list of ActionInformation instances in
>the _actions attribute.  Two interesting items which are included in this
>refactoring is that the action and a new condition field are stored as an
>instance of an Expression; this allows for writing actions and conditions
>TTW in TALES (i.e. string: ${portal_url}/some_form).  The condition is a
>new feature allowing for more precision when determing when an action should
>be
>displayed.  The following is a sample of instantiating an ActionInformation
>instance from within the ActionsTool:
>  _actions = [ActionInformation(id='folderContents'
>                                 , title='Folder contents'
>                                 , action=Expression(
>                text='string: ${folder_url}/folder_contents')
>                                 , condition=Expression(
>                text='python: folder is not object')
>                                 , permissions=('List folder contents',)
>                                 , category='object'
>                                 , visible=1
>                                  )]