[z3-five] Re: Using Zope2 page templates with Five
Philipp von Weitershausen
philipp at weitershausen.de
Tue Jan 25 16:13:36 MET 2005
Lennart Regebro wrote:
> Philipp von Weitershausen wrote:
> > I certainly would like to have Zope 3 ZPTs in Five, as would probably
> > others.
>
> I think that sounds reasonable, but out of interest: What are your
> specific reasons?
Zope3-style traversal (@@, ++resource++, etc.) as well as ZPT traversal
adapters to name one, e.g.
* context/zope:title
* context/@@absolute_url/url:quote
etc.
Also, as Martijn pointed out, there are certain subtle differences that
I don't know off of the top of my head (I think wrt i18n etc.).
> >If people really have the use case of needing Zope 2 ZPTs, how
> > about the following:
> >
> > <browser:page> and all the configuration directives known from Zope 3
> > make regular Zope 3 ZPT pages, while <five:page> and corresponding
> > directives make Zope 2 ZPT pages. Or, maybe in a more intuitive manner,
> > <zope2:page>?
>
> Nope, because the zope2 pages need to interact with the zope3 pages, and
> call widget macros and so on, so all page statements must use the same
> base. A page created with a <five:page> directive would not be able to
> use zope3 widgets, while a <browser:page> directive using Zope3 ZPTs can
> not use the design of a CMF site.
Right, so where's the problem. Somebody who uses Five to integrate with
CMF templates probably never wants to (and probably even cannot) use
Zope 3 templates at the same time.
So, all Five-based products that have to do with the CMF would use
five:page, all others would use browser:page. Where's the problem?
> Zope2 page templates just makes CMF integration a hundred gazillion
> times easier,
I can imagine that. I definitely see the use case for Five supporting
both flavours.
> so if you really need Zope3 templates, we probably should
> have a configuration statement to say which type is to be used.
Again, I don't think that's necessary. I think explicitly stating which
flavour is to be used by choosing between <browser:page> and <five:page>
or <browser:editform> and <five:editform>, etc., would be sufficient and
more elegant. Explicit is better than implicit.
Philipp
More information about the z3-five
mailing list