[Zope-CMF] Re: Method Aliases on CMFSite?

Jean-Francois.Doyon at CCRS.NRCan.gc.ca Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Wed Mar 23 10:08:01 EST 2005


Yuppie,

Indeed, I've noticed that.  The PortalFolder class is mixed in pretty deep
though (PortalObject).

What I'd like to do is have CMFSite use something OTHER than
"Folder"/PortalFolder however.

Obviously my type would still be folderish, but I'd like to customize it
some, and possible make both folder-ish AND content-ish.

One idea would be to do something like this:

Class MyCMFSite(MyType, CMFSite):

Where MyType would be something like:

Class MyType(PortalFolder, PortalContent):

I'm not entirely sure that's safe though ... I may inadvertently overload
something that's already overloaded, or something like that? I'll have to
check.
I may even give it dublincore support.  I'd simply create a portal type like
any other, but for the sole purpose of being mixed-in and existing in the
portal_types tool.  It would never actually get constructed.

Another option is to solely overload getTypeInfo() in MyCMFSite ... And have
it return a TypeInformation() that suits my needs.  This type however would
not exist within the portal_types tool, and I'm wondering whether THAT may
cause problems ...

Thanks for the help,
J.F.

-----Original Message-----
From: zope-cmf-bounces at mail.zope.org [mailto:zope-cmf-bounces at mail.zope.org]
On Behalf Of yuppie
Sent: March 23, 2005 6:04 AM
To: Jean-Francois.Doyon at ccrs.nrcan.gc.ca; Zope-CMF List
Subject: [Zope-CMF] Re: Method Aliases on CMFSite?

Jean-Francois.Doyon at CCRS.NRCan.gc.ca wrote:
> I would like to have the "home page" of my CMF site as a skin: That 
> is, view my CMF Site Root just like any other CMF type, using skins.
> 
> I've started by creating my own Portal root, subclassing CMFSite.
> 
> Then, I overloaded view and __call__ to use _getViewFor() and so on, 
> but saw a deprecation warning.
> 
> So now I'm into looking into getting my CMFSite subclass to support 
> method aliases ...
> 
> Unfortunately this doesn't seem straight forward :(
> 
> As best I can tell, the hook for these aliases is in DynamicType.py 
> ... But it looks in the TypeInfo for the information, and CMFSite doesn't
have any.

It has a TypeInfo. The portal type of a default CMFSite object is 'Folder'.
CMFSite has some additional features, but apart from that it should behave
like any other 'Folder'.

Cheers, Yuppie

_______________________________________________
Zope-CMF maillist  -  Zope-CMF at lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


More information about the Zope-CMF mailing list