What is the difference between IPloneSiteRoot and ISiteRoot in Plone?

I work in Plone 4.1, and I'm just curious to know the difference between Products.CMFPlone.interfaces.IPloneSiteRoot and Products.CMFCore.interfaces.ISiteRoot. If I want to register a zope-3 style view, to which do I need to register it?

+4
source share
2 answers

IPloneSiteRoot is a special kind of ISiteRoot. IPloneSiteRoot is provided by the root of the Plone site, while ISiteRoot is provided by any CMF portal. If your product is designed to work only in Plone, it really doesn't matter which interface you use. If you want to be able to use it with other CMF-based applications, use ISiteRoot.

Honestly, I usually go with ISiteRoot just because it is shorter to print. :)

+6
source

Whenever I want to use the site root, I usually end up using INavigationRoot from plone.app.layout.navigation.interfaces.INavigationRoot.

InavigationRoot is provided by the Plone site object, but it will also be provided by the navigation root of any child site or top-level folders on a multilingual site. In particular, in multilingual sites, users will never navigate or see the actual root of the site, so any functions related to it will not be available to them.

ISiteRoot only makes sense for things like export import handlers or other internal logic, but not for any visible enduser functions.

+7
source

All Articles