Jens Vagelpohl wrote:
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 :)



Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to