[prev in list] [next in list] [prev in thread] [next in thread]
List: zope-cmf
Subject: [Zope-CMF] Re: PortalObject, PortalFolder,
From: yuppie <y.2005- () wcm-solutions ! de>
Date: 2005-06-21 14:21:54
Message-ID: 42B82282.4020101 () wcm-solutions ! de
[Download RAW message or body]
Hi Christian!
Christian Heimes wrote:
> While I was working on the CMF 1.5 integration into AT and
> ATContentTypes for Plone 2.1 I had some issues with the view on folders.
> After some digging I found these interesting results:
>
> CMFCore.PortalObject defines __call__ to use method aliases and
> _getViewFor() as fallback, view = __call__ and index_html = None.
>
> CMFDefault.SkinnedFolder defines __call__ to use _getViewFor(), view =
> __call__ and index_html = None
>
> CMFCore.PortalFolder doesn't hook into index_html/__call__ publishing at
> all.
>
>
> What's the reason PortalFolder doesn't define __call__ at all? Shouldn't
> it use __call__ to get the view from method aliases or _getViewFor() as
> fallback?
1.) PortalFolder did never have a __call__ method and apparently nobody
missed it so far.
2.) I know only one situation where we need to call an object directly:
If a content object is used as a view method. That is e.g. the case for
'index_html' documents, but doesn't make much sense with folders.
> Why does SkinnedFolder still uses the old and deprecated way as default
> way to get the view and why does it ignore method aliases completly? IMO
> SkinnedFolder.__call__ is buggy and wasn't fixed when method aliases
> were introduced.
Like other folders a skinned folder should never be used as method, so
__call__ should never be invoked. That code exists just for backwards
compatibility and is completely removed on HEAD.
Cheers,
Yuppie
_______________________________________________
Zope-CMF maillist - Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf
See http://collector.zope.org/CMF for bug reports and feature requests
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic