[Zope-CMF] Method Aliases on CMFSite?

Jean-Francois.Doyon at CCRS.NRCan.gc.ca Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Tue Mar 22 16:49:10 EST 2005


Hello,

Using Zope 2.7.4 and CMF 1.5 ...

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.

Now before I go any further with some nasty tricks:

Anybody done this?

Why is the CMFSite different than any other content type in this regard?
I'd like to treat it more like any other object, with content holding
attributes and applying skins to it for viewing ... This would seem like a
pretty logical thing ... Or am I missing something?

I find having an "index_html" in my skins (or anywhere else for that matter)
rather ugly ...

Some thoughts on how I might do it otherwise:

- Overload getTypeInfo() and queryMethodID() on my version of CMFSite to see
if I can get DynamicType.__before_publishing_traverse__ to behave nicely for
my CMF Site Root class/instance.

- Get my CMF Root class to appear as a registered type in the portal_types
tool, and setup the aliases there, allowing
DynamicType.__before_publishing_traverse__ to find them?

I'm thinking a combination of the above 2 should do the trick?

Any insight would be most appreciated :)

Thanks,
J.F.



More information about the Zope-CMF mailing list