[Zope-CMF] Re: folder_contents was Re: [dev] two small changes
yuppie
y.2004_ at wcm-solutions.de
Fri Feb 6 07:53:43 EST 2004
Hi!
Tonico Strasser wrote:
> yuppie wrote:
[...]
> I find the global setting in the actions tool is not good. I think a
> normal object shouldn't have a folder_contents action by default. It's
> confusing and if I would repeat this logic for custom types, things
> would get complicated. But thats just my view.
I would agree that folderContents doesn't really belong into the
category 'object'. Looking at the history of the actions tool before CMF
1.3 there was only 'folder/folderContents', not 'object/folderContents'.
I think that was better. But I would not remove 'folderContents'
completely because there should be a link to the container of the object.
> Removing the visible flag
> (or deleting the action) is not an option, because I want to be as
> compatible as possible with plain CMF.
I can't follow you here: I thought the problem was related to the fact
you *did* delete the action.
[...]
>> 1.) If 'Translation' has a folder_contents method, an invisible
>> 'object/folderContents' method should work.
>
>
> How? As you mentoined before:
>
> > getActionInfo is an ActionProvider method, not an ActionsTool method.
> > atool.getActionInfo() does only return actions defined in
> portal_actions.
>
> Ah, do you mean in portal_actions? Hmm.
Yes. In portal_actions.
>> 2.) If there is a need for a general fallback to e.g. 'object/view',
>> we could use something like
>>
>> try:
>> item_url = atool.getActionInfo('object/folderContents', item)['url']
>> except ValueError:
>> ti = item.getTypeInfo()
>> item_url = ti.getActionInfo('object/view', item)['url']
>>
>
> FWIW. Kann nicht schaden.
Done.
> Looks good. What about adding object/folderContents to Folder and
> Skinned Folder?
Well. If you ask me the 'folder/edit' Action would be the right Action
to manipulate folder contents. 'folder_edit_form' should be called by
'folder/metadata' or become part of 'folder_contents' (or
'folder_contents' part of 'folder_edit_form').
But right now I'm not the person who'll do that.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list