[Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Jeff Rush
jeff at taupro.com
Tue Dec 13 16:42:11 EST 2005
Frank Burkhardt wrote:
>
> On Tue, Dec 13, 2005 at 02:02:05PM +0100, Andreas Elvers wrote:
>
>>what the rationale of @@ anyway ? I've searched for a definition for
>>this in the Developer Handbook and elsewhere but it's hard to search
>>for @@ and view.
>
> @@ marks a given path component explicitely as a view of the previous object.
>
> Example:
>
> http://zopeserver/contents.html
>
> Could mean either "The object named 'contents.html' in the root folder" or
> (if there is no such object) "The 'contents.html' view (List of contained
> objects) of the root folder" - the object is preferred.
>
> http://zopeserver/@@contents.html
>
> Will always display the list of contained objects of the root folder - no matter
> if there's a object 'contents.html' or not.
Hmm, but the '@@' is optional, as I can leave it off and still get the
contents.html view if there is no object named contents.html in that folder.
This would seem to confuse developers, as if there IS an accidental
collision of an item name with a view that is unknown to the developer, it
will return the view out of nowhere.
Shouldn't the '@@' should be *required* on views to avoid this ambiguity?
-Jeff
More information about the Zope3-users
mailing list