Fred Drake wrote:
On Jan 18, 2008, at 10:35 AM, Malthe Borch wrote:
In the current implementation, z3c.jbot monkeys its way into
zope.pagetemplate to easily allow overriding the template source file.

Whacky.

Sure it's wacky; it's also the only straightforward way to customize Plone at the moment.

Is this really a page template problem?  It doesn't seem so.

I'm not sure of it is, but certainly it's quite logically to want to take an existing template and change a bit, only you don't want to change the original package of course. Point being that the template itself is a very concrete object of interest and it's easy to understand how to customize it.

Why not make the separation cleaner? One pattern that we see hinted at in zope.formlib is that views (UI for the logic) reference templates that are registered elsewhere by name. The implementation there suffers in that the templates themselves aren't (so can't be selected based on the skin/layers), but if they're made to be named views of the (logic) view, all the flexibility you describe can be had.

Right certainly named templates is one way to do it. The approach I took was assigning canonical names based on the actual location on the file system and the package.

I'm not saying it's the right approach, but it's certainly an approach that works well with packages that define skins using ViewPageTemplateFile-objects.

\malthe

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to