[Zope-CMF] Re: Adding context to FactoryTypeInformation.queryMethodID

yuppie y.2005- at wcm-solutions.de
Tue Jun 14 05:19:58 EDT 2005


Hi Christian!


Christian Heimes wrote:
> I'd like to change the queryMethodID method of FactoryTypeInformation in 
> CMF 1.5 and HEAD. I want to reimplement Archetype's template mixin 
> feature for CMF. (*)
> 
> For the new feature I need the caller context in queryMethodID for a 
> dynamic view template. I propose to alter the method from 
> queryMethodID(self, alias, default=None) to queryMethodID(self, alias, 
> default=None, context=None) and add context=self to all calls of 
> queryMethodID.

I'm not sure I understand what you propose:

- Just changing queryMethodID signature and calls?

- Or also adding the TemplateMixin stuff to CMFCore?

- Or also adding an UI for that to CMFDefault?

> (*)
> TemplateMixin allows to register different view templates per portal 
> type. The owner of a content object can select a template that should be 
> used as the default template for his object. For example he can choose 
> that a folder should be viewed as photo album instead of folder listing 
> by default.

Zope 2.8/Five has a different machinery that allows to do something 
similar: Adding marker interfaces to objects and specifying views for them.

This product implements the feature for Plone: 
http://codespeak.net/svn/z3/Flon/trunk/

Is there a need to have TemplateMixin *and* marker interfaces? What are 
the pros and cons of the two approaches?

> I would be happy to contribute it to CMF 1.5 under ZPL 2.1. Is CMF 1.5 
> still open for new features?

CMF 1.5 is open for small features that are 100% backwards compatible.


Cheers,

	Yuppie



More information about the Zope-CMF mailing list