[Zope-CMF] Re: [dev] CMF 2.0 browser views and Five traversal
yuppie
y.2006_ at wcm-solutions.de
Wed Mar 8 16:52:09 EST 2006
Hi Jens!
Jens Vagelpohl wrote:
>> - We need new names for the views. I'd like to use @@view.html,
>> @@edit.html and @@properties.html for the views that already exist. I
>> think 'metadata_edit_form' and 'folder_edit_form' are both in fact
>> properties views and 'folder_contents' is just a special edit view.
>> I'd like to use the same names for container views as for content views.
>
> Love the proposal, hate the "@@" naming. Do we need that? Or is the goal
> to align better with the Zope 3 way of naming views? I'd like a simple
> "index.html" or "edit.html" etc much better.
For now I just propose to use the '@@' names internally. The users will
still see the old names, the Method Aliases machinery maps them to the
new names.
For example this profile XML is for the Document aliases:
<?xml version="1.0"?>
<object name="Document">
<alias from="(Default)" to="@@view.html"/>
<alias from="view" to="@@view.html"/>
<alias from="document_view" to="@@view.html"/>
<alias from="document_edit_form" to="@@edit.html"/>
<alias from="metadata_edit_form" to="@@properties.html"/>
</object>
You could access the edit view with 'edit.html' instead of
'@@edit.html', but that has a major drawback: View names are not
protected in any way if used without '@@'. You can easily screw up your
site by adding content with the ID 'edit.html'.
Names used by Method Aliases are protected *and* Method Aliases are
looked up first. So it would be safe to define an 'edit.html' alias for
'document_edit_form' or '@@edit.html'. I actually do that on my sites.
But changing the visible names is not part of my proposal.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list