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
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?
I'm proposing at least the first point in your list, changing the
signature and calls. I'm going to implement the template mixin in a
different way for Plone but I would be happy to contribute the feature
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:
Is there a need to have TemplateMixin *and* marker interfaces? What are
the pros and cons of the two approaches?
The con against the marker interface is easy to explain: We need the
feature in Plone 2.1 but we won't depend on ZopeX3 and Five. :)
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests