-----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.

jens



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFF6szDRAx5nvEhZLIRAihRAJ9HejiRPThS2Tck/nbFnPv3s1jVUQCgmnck
L4NMFaWpqLE0zozhuc5oo/g=
=6FX+
-----END PGP SIGNATURE-----
_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

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

Reply via email to