[Zope-CMF] Re: Five's local sitemanager, CMF, etc

Martin Aspeli optilude at gmx.net
Sun Mar 4 12:56:45 EST 2007


Jens Vagelpohl wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> On 26 Feb 2007, at 17:03, Martin Aspeli wrote:
>>> To get to the portal root / CMF site, I suggest a pattern that is
>>> sometimes used in Zope3: We register the CMF site object as a utility
>>> providing ICMFSite (or whatever). Then whichever code that's executed
>>> below the portal (and that includes CMF tools) can do
>>> getUtility(ICMFSite) to get to the site.
>>>
>> +1 - in fact, we already have  
>> Products.CMFCore.interfaces.ISiteRoot. I use
>> it all the time. :)
> 
> This is now completed on the branch. I did not try to locate every  
> single place in the code where the site is looked up, though. I  
> patched a couple specific places pointed out by Yuppie, and the main  
> URLTool.getPortalObject method to use the utility.

Fantastic :)

Thanks!

Martin



More information about the Zope-CMF mailing list