[Zope-CMF] Re: Serious problem with type actions - Proposal

Yuppie schubbe@web.de
Sat, 03 May 2003 15:23:18 +0200


Hi!


To draw conclusions from the discussion, here a small proposal:


Goals:
======

long-term goals (CMF 1.5):
- unify usage of actions:
   by default, all actions return absolute URLs
- make type actions more powerful by improving _getViewFor
- resolve <http://collector.zope.org/CMF/66>

short-term goals (CMF 1.4):
- 100% backwards compatibility to CMF 1.3
- make "string:${object_url}/whatever_view" work
- provide a migration path to CMF 1.5


Proposed solution (CMF 1.4):
============================

1.) Manipulate Expressions starting with 'string:${object_url}/':
If the result starts with '/', '/' will be removed from the return value.

(same with folder_url and portal_url)

This is a 4 line change in Expression.py and seems to work well with 
existing CMFDefault and Plone sites. Maybe it's cleaner to do this 
inside _getViewFor and getActionById. But I guess we would need more 
than 4 lines to do that.

2.) Change factory_type_information of content types to 
"string:${object_url}/whatever_view".



Any thoughts? I'm prepared to do the proposed changes within the next 
week if there are no objections.


Cheers,

Yuppie