[Zope-CMF] Getting rid of index_html when skinning data classes

Tres Seaver tseaver@zope.com
05 Mar 2003 11:48:58 -0500


On Wed, 2003-03-05 at 11:35, Erik Dahl wrote:
> I have been migrating my zope app to use CMF skins.  I have it all 
> working except the "default" view which currently uses the index_html 
> attribute.  How should this work in a skinned world?  I have looked 
> around for docs but haven't found any.  immediate_view in the 
> factory_type_information looked like a good bet but doesn't do anything 
> for me.

I don't understand, quite.  You can make your content objects
"index_html-oblivious":

  - Define 'index_html = None' at class scope.

  - Declare your own '__call__', which does the Right Thing (tm) (e.g.,
    looks up the template from the "view" action of the object's portal
    type).

Deriving from Products.CMFCore.PortalContent.PortalContent gets you
these two things for free.

> Also on a side note I only wanted to use CMFCore but looks like you need 
> CMFDefault for the portal_url tool and then it depends on CMFTopic.  Are 
> these dependencies necessary?  I'm new to CMF so maybe I'm missing 
> something here.

CMF 1.4 (hoped to be released this month) moves the URL tool to CMFCore,
and untangles a couple of other funky dependencies.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com