Fixing the views and actions in AT base classes once and for all

Martin Aspeli <[email protected]> Mon, 10 Jul 2006 21:14:33 +0100
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Message-ID <[email protected]>
I want to fix https://dev.plone.org/plone/ticket/5587 and friends.

This is actually trivial, and I'm happy to do it, but we need to decide 
if there is any potential for breakage, and on which branches to do it. 
I'd concier this to be a bug (or at least a source of a lot of other 
people's bugs if they're not careful - see below) in the 2.5 series as 
per that ticket, so I'd like to fix it on 1.4 branch at least.

The fundamental problem:

  - Since CMF 1.5, the preferred way of modifying the view of a type has 
been to set the '(Default)' and 'view' aliases. It's also common 
practice to have an 'edit' alias, and ATCT introduces the convention 
having 'properties' and 'sharing' aliases as well.

  - AT's base objects don't take this into account, and have 
empty/inherited alias dicts and mess with actions. To be clear, actions 
are about defining links/tabs, and is something people should need to 
touch very rarely. At the moment, however, you have to re-define all the 
boilerplate/best-practice actions and aliases each time.

  - As of Plone 2.5 and/or CMF 1.6, something changed (don't ask me 
what) and types that don't set actions/aliases get screwed up when you 
try to go to the /view alias. That is, the inherited (empty) 'view' 
alias somehow ends up picking up the view of the root of the Plone site. 
Or something. I'm not really too interested in picking through that code 
*again* when the real problem is that BaseContent and BaseFolder are 
using antiquated and deprecated ways of doing views.

So, what we need to do is to ensure that AT sets the aliases:

	'view' : 'base_view'
	'edit' : 'base_edit'
	'properties' : 'base_metadata'
	'sharing' : 'folder_localrole_form' (maybe not, if that's a plone-only 
form)
	'(Default)' : 'base_view'

And the actions:

	'view' : '${object_url}'
	'edit' : '${object_url}/edit'
	'metadata' : '${object_url}/properties'
	'local_roles' : '${object_url}/sharing'

Martin



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642