[Zope3-dev] Re: RFC: The browser:page compromise
Philipp von Weitershausen
philipp at weitershausen.de
Sat Apr 22 14:15:52 EDT 2006
dev at projekt01.ch wrote:
> Hi Philipp
>
>>> IMO it would be great to solve this properly, because one point of
>>> using views is to have a fine control over what to publish
>> and what not.
>>> And this is a bit broken at this point, currently.
>> Right, that's why page templates that just provide macros
>> should be registered unpublishable browser views and not
>> browser pages.
>>
>> You see how far into the confusion the <browser:page />
>> directive has brought us?
>
> Yes,
> but this is only a problem how we lookup views/pages
> via /@@ in templates.
That's how we lookup views. @@ is short for ++view++. Traversal
namespaces are the way to lookup things that are not direct attributes.
> The implementation of a *provider*
> tales expression for viewlet manager totaly avoids this :-)
As I said in another post, I think tales expressions are abused there.
For looking up views, would you not use ++view++ but rather a view:
TALES expression? Or for resources? I think not.
Getting from an object to a view (=view,page,viewlet,etc.) of this
object is traversal. It belongs into a traversal adapter.
Philipp
More information about the Zope3-dev
mailing list